Commit Graph

2378 Commits

Author SHA1 Message Date
Sven Neumann 6ce6160966 don't choke on brush files with empty names (bug #343140).
2006-05-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): don't
	choke on brush files with empty names (bug #343140).
	(gimp_brush_generated_save): warn about brushes with empty names.
2006-05-29 15:43:05 +00:00
Michael Natterer 70adfc5c7e added support for extracting colors from the selected pixels only.
2006-05-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppalette-import.[ch]: added support for extracting
	colors from the selected pixels only.

	* app/dialogs/palette-import-dialog.c: added "Sample merged" and
	"Selected Pixels only" toggles. Fixes bug #316212. Cleaned up the
	code quite a bit.
2006-05-28 14:51:06 +00:00
Michael Natterer cec27e0b48 remove code duplication, cleanup.
2006-05-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-crop.c (gimp_image_crop_guess_bgcolor):
	remove code duplication, cleanup.
2006-05-27 16:50:24 +00:00
Michael Natterer 41e76ffdcf fix spacing broken by tab removal.
2006-05-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.h: fix spacing broken by tab removal.
2006-05-27 15:31:35 +00:00
Michael Natterer fa03960519 the default tool is the paintbrush, not rect select.
2006-05-24  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_tool_list_thaw): the
	default tool is the paintbrush, not rect select.

	* app/tools/gimp-tools.c (gimp_tools_register): attach the default
	visibility state to the tool_info.

	* app/actions/tools-commands.c (tools_reset_cmd_callback): use the
	attached boolean instead of reimplementing the default visibility
	logic.
2006-05-24 15:04:45 +00:00
Michael Natterer c99609fd8b Fix for bug #333156:
2006-05-23  Michael Natterer  <mitch@gimp.org>

	Fix for bug #333156:

	* app/paint-funcs/paint-funcs-types.h (enum CombinationMode):
	added value COMBINE_INTEN_A_INDEXED.

	* app/paint-funcs/paint-funcs.c
	(combine_inten_a_and_indexed_pixels): new function which
	implements the new CombinationMode.

	(combine_sub_region)
	(combine_regions): added the needed bits to call the new function.

	* app/core/gimpprojection-construct.c (project_indexed): added
	mask PixelRegion parameter since that's supported by paint-funcs
	now, replaced g_warning() about unimplemented combine type
	by call to combine_regions(..., COMBINE_INTEN_A_INDEXED).

	(gimp_projection_construct_layers): pass the mask to
	project_indexed() and removed comments about not supporting it.
2006-05-23 19:18:00 +00:00
Karine Delvare 1ce44a4555 app/core/gimpcontext.c app/tools/gimp-tools.c
2006-05-23  Karine Delvare  <edhel@gimp.org>

	* app/core/gimpcontext.c
	* app/tools/gimp-tools.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectselecttool.c
	* app/widgets/gimptoolbox.c
	* menus/image-menu.xml.in: replace old rect select by new in the
	toolbox.
2006-05-23 18:14:51 +00:00
Sven Neumann c3448b2cbf It makes more sense to have GimpData::dirty indicate a name change than to
2006-05-23  Sven Neumann  <sven@gimp.org>

	It makes more sense to have GimpData::dirty indicate a name change
	than to invalidate the previews whenever the name changes.

	* app/core/gimpdata.c: call gimp_object_name_changed() from
	gimp_data_real_dirty() instead of implementing
	GimpObject::name-changed and calling gimp_data_dirty() from there.

	* app/core/gimpbrushclipboard.c
	* app/core/gimppalette.c
	* app/core/gimppatternclipboard.c: call gimp_data_dirty() in place
	of gimp_object_name_changed().

	* app/core/gimpbrushgenerated.c (gimp_brush_generated_dirty):
	chain up unconditionally.
2006-05-23 15:39:45 +00:00
Michael Natterer 3e5b6e0e05 app/core/Makefile.am new files with functions to translate, flip, rotate,
2006-05-21  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpimage-item-list.[ch]: new files with functions to
	translate, flip, rotate, transform and align a list of items
	inside an undo group.

	(gimp_image_item_list_get_list): returns a list of items matching
	any combination of GimpItemTypeMask and GimpItemSet.

	* app/core/gimpitem.[ch]: added new function gimp_item_is_in_set().

	* app/core/gimpitem-linked.[ch]: use the new functions. Removed
	gimp_item_linked_get_list().

	* app/tools/gimpeditselectiontool.c: use
	gimp_image_item_list_get_list() instead of
	gimp_item_linked_get_list().

	* app/core/gimpimage-resize.c
	* app/tools/gimpaligntool.c: use the new functions instead of
	creating and iterating the lists manually.
2006-05-21 11:32:41 +00:00
Michael Natterer 42ff7f4920 remove enum GimpItemLinkedMask...
2006-05-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem-linked.h: remove enum GimpItemLinkedMask...

	* app/core/core-enums.[ch]: ...and add it here as GimpItemTypeMask.
	Renamed enum GimpImageResizeLayers to GimpItemSet.

	* app/core/gimpitem-linked.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/dialogs/resize-dialog.[ch]
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/tools/gimpeditselectiontool.c: changed accordingly.
2006-05-19 14:50:46 +00:00
Sven Neumann 03f0f65502 use the enum's name instead of the nick, strip the "GIMP_" prefix and
2006-05-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpparamspecs-desc.c: use the enum's name instead of
	the nick, strip the "GIMP_" prefix and canonicalize it.
2006-05-18 18:56:59 +00:00
Sven Neumann fae8657c21 tools/pdbgen/app.pl removed code that used to fiddles with the argument
2006-05-18  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/app.pl
	* tools/pdbgen/lib.pl: removed code that used to fiddles with
the
	argument descriptions.

	* tools/pdbgen/pdb/*.pdb: removed %%desc%% placeholder, added
some
	missing argument descriptions.

	* app/pdb/*_cmds.c
	* libgimp/gimpdrawabletransform_pdb.c
	* libgimp/gimpfloatingsel_pdb.c
	* libgimp/gimpgradient_pdb.c
	* libgimp/gimppainttools_pdb.c: regenerated.

	* app/core/Makefile.am
	* app/core/gimpparamspecs-desc.[ch] (gimp_param_spec_get_desc):
	new function that creates a parameter description for the PDB.

	* app/pdb/gimppdb-query.c
	* app/pdb/procedural_db_cmds.c: use the new function to create
the
	descriptions on the fly.
2006-05-18 17:25:15 +00:00
Michael Natterer aebf12dfb9 app/core/gimpbrushclipboard.c (gimp_brush_clipboard_buffer_changed) limit
2006-05-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrushclipboard.c
	(gimp_brush_clipboard_buffer_changed)
	* app/core/gimppatternclipboard.c
	(gimp_pattern_clipboard_buffer_changed): limit the size of
	clipboard brushes and patterns to 512x512 pixels to prevent OOM
	conditions when copying from huge drawables.
2006-05-17 19:00:49 +00:00
Michael Natterer 1b60573fae app/core/gimpbrushclipboard.c (gimp_brush_clipboard_buffer_changed) remove
2006-05-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrushclipboard.c
	(gimp_brush_clipboard_buffer_changed)
	* app/core/gimppatternclipboard.c
	(gimp_pattern_clipboard_buffer_changed): remove calls to
	gimp_data_dirty() because the emission of "name-changed" takes
	care of that.
2006-05-17 10:36:21 +00:00
Sven Neumann 5084a123c9 app/core/gimpbrushclipboard.c (gimp_brush_clipboard_buffer_changed) emit
2006-05-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrushclipboard.c
	(gimp_brush_clipboard_buffer_changed)
	* app/core/gimppatternclipboard.c
	(gimp_pattern_clipboard_buffer_changed): emit "name-changed" so that
	the description is being updated.
2006-05-17 10:24:03 +00:00
Michael Natterer 109767513b add a clipboard pattern to the pattern factory (forgot to commit this
2006-05-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.c (gimp_real_initialize): add a clipboard pattern
	to the pattern factory (forgot to commit this file).
2006-05-17 09:49:20 +00:00
Michael Natterer d7cd890c9c app/core/Makefile.am app/core/core-types.h new GimpPattern subclass that
2006-05-16  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimppatternclipboard.[ch]: new GimpPattern subclass
	that auto-updates its contents from gimp->global_buffer.

	* app/core/gimp.c (gimp_real_initialize): add a clipboard pattern
	to the pattern factory.

	* app/widgets/gimpaction.c (gimp_action_set_proxy): replace the
	GimpView by a new one if the viewable type changes, instead of
	running into a warning (didn't happen before because this is only
	used for imagefiles and patterns, which didn't have subclasses).
2006-05-16 19:55:01 +00:00
Michael Natterer d15a6191b6 app/paint-funcs/paint-funcs-generic.h implement copy_color() and
2006-05-16  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.[ch]: implement copy_color() and
	copy_color_pixels() which copy only the color bytes into a dest
	that has one byte less than src. Renamed component_pixels() to
	copy_component_pixels().

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpbrushclipboard.[ch]: new GimpBrush subclass that
	auto-updates its contents from gimp->global_buffer.

	* app/core/gimp.c (gimp_real_initialize): add a clipboard brush to
	the brush factory. Fixes bug #111082.
2006-05-16 13:11:47 +00:00
Sven Neumann c14c5393cc indentation.
2006-05-16  Sven Neumann  <sven@gimp.org>

	* app/app_procs.c (app_run): indentation.

	* app/core/gimp.c (gimp_real_initialize)
	* app/plug-in/gimppluginmanager.c (gimp_plug_in_manager_restore):
	moved a call to status_callback() to the plug-in manager.
2006-05-16 11:43:55 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Sven Neumann c89807658a include "libgimpconfig/gimpconfig.h".
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-utils.c: include "libgimpconfig/gimpconfig.h".
2006-05-15 06:57:54 +00:00
Michael Natterer 1217dc8d07 Allow to initialize a new layer mask with any of the image's channels.
2006-05-14  Michael Natterer  <mitch@gimp.org>

	Allow to initialize a new layer mask with any of the image's
	channels. Fixes bug #310207.

	* libgimpbase/gimpbaseenums.h (enum GimpAddMaskType): added
	value GIMP_ADD_CHANNEL_MASK.

	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* app/core/gimplayer.[ch] (gimp_layer_create_mask): added
	GimpChannel* parameter. Hacked the GIMP_ADD_SELECTION_MASK code a
	bit so it can handle GIMP_ADD_CHANNEL_MASK too. Cleaned up the
	function a bit.

	* app/dialogs/layer-add-mask-dialog.[ch]: added a menu of the
	image's channels.

	* app/actions/layers-commands.c (layers_add_mask_response): pass
	the channel selected in the menu to gimp_layer_create_mask().

	* tools/pdbgen/pdb/layer.pdb (layer_create_mask): use the image's
	active channel when GIMP_ADD_CHANNEL_MASK is passed. Fail if there
	is no active channel.

	* app/pdb/layer_cmds.c: regenerated.
2006-05-14 16:24:31 +00:00
Michael Natterer 8ffd5bb0ff add an alpha channel if the layer has none and interpolation is requested.
2006-05-13  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_transform): add an alpha
	channel if the layer has none and interpolation is requested.
	Works around bug #315048, the real fix would be to implement
	interpolation on layers without alpha.
2006-05-13 21:49:29 +00:00
Hans Breuer 429d71e5e2 updated dont include "config/gimpbaseconfig.c", it gives an redefinition
2006-05-13  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated
	* app/core/gimp-util.c : dont include "config/gimpbaseconfig.c", it
	gives an redefinition error with msvc. Instead include
	config/gimpbaseconfig.h and libgimpconfig/gimpconfig-path.h

	* plug-ins/common/psd_save.c : fix c99isms (declarations only at the
	start of a block)
2006-05-13 17:05:15 +00:00
Michael Natterer 1f61feeec9 app/core/gimpimage.c (gimp_image_new) app/core/gimpitem.c
2006-05-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.c (gimp_image_new)
	* app/core/gimpitem.c (gimp_item_configure)
	* app/display/gimpdisplay.c (gimp_display_new): make sure IDs wrap
	correctly at G_MAXINT and skip IDs which are currently in use.

	It makes no sense to treat gimp->image_table and gimp->images
	differently, since they keep the same set of images. And it makes
	no sense to treat gimp->displays and gimp->images differently.
	Moved all container adding into the objects' constructors:

	* app/core/gimp.c (gimp_create_image): don't add the new image
	to gimp->images here...

	* app/core/gimpimage.c (gimp_image_constructor): ...but here.

	* app/core/gimp-gui.c (gimp_create_display): don't add the new
	display to gimp->displays here...

	* app/display/gimpdisplay.c (gimp_display_new): ...but here.
2006-05-09 19:15:49 +00:00
Michael Natterer 9d36204976 don't #include "gimp.h".
2006-05-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.c: don't #include "gimp.h".
2006-05-08 11:15:51 +00:00
Michael Natterer 66a66b3218 added "gboolean none_ok" members to GimpParamSpecImageID,
2006-05-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: added "gboolean none_ok" members
	to GimpParamSpecImageID, GimpParamSpecItemID and
	GimpParamSpecDisplayID.  If none_ok is set, allow '0' and '-1' as
	valid IDs. Added "none_ok" parameter to all ID param spec
	constructors.

	* app/pdb/gimp-pdb-compat.c: set none_ok to TRUE in all compat
	param specs, so only IDs that are really random garbage don't pass
	validation. Fixes validation errors with 0 and -1 IDs.

	* tools/pdbgen/app.pl: set none_ok to FALSE by default. Added
	support for $arg->{none_ok} to control it.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/progress.pdb
	* tools/pdbgen/pdb/text_tool.pdb: use none_ok instead of
	no_success (which disables validation entirely).

	* app/pdb/[many]_cmds.c: regenerated.
2006-05-06 18:57:51 +00:00
Michael Natterer 808b65cd31 added signals "plug-in-opened" and "plug-in-closed". Added functions
2006-05-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginmanager.[ch]: added signals
	"plug-in-opened" and "plug-in-closed". Added functions
	gimp_plug_in_manager_add_open_plug_in() and _remove_open_plugin()
	which maintain the list of open plug-ins and emit the signals.

	* app/plug-in/gimpplugin.c (gimp_plug_in_open)
	(gimp_plug_in_close): don't touch manager->open_plug_ins and don't
	ref/unref the plug-in. Call above new functions instead. Don't
	call gimp_pdb_dialogs_check().

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: removed gimp_pdb_dialogs_check().

	* app/widgets/gimppdbdialog.[ch]: removed
	gimp_pdb_dialogs_check_callback() and connect to the
	plug-in-manager's "plug-in-closed" signal instead.
2006-05-04 22:51:21 +00:00
Sven Neumann c1576daf2f added a "verbose" parameter.
2006-05-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-user-install.[ch]: added a "verbose" parameter.
2006-05-04 13:38:40 +00:00
Michael Natterer 40012d8853 restore the strict checks on string arrays.
2006-05-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.c (gimp_string_array_new)
	(gimp_param_string_array_validate): restore the strict checks
	on string arrays.

	* app/plug-in/gimppluginmanager-help-domain.c
	(gimp_plug_in_manager_get_help_domains): return NULL string arrays
	when there are 0 help domains to fix the inconsistency at its root.
2006-05-04 10:03:53 +00:00
Sven Neumann adf39aec4c relaxed the checks so that GimpStringArray deals correctly with (length ==
2006-05-03  Sven Neumann  <sven@gimp.org>

	* app/core/gimpparamspecs.c (gimp_string_array_new,
	gimp_param_string_array_validate): relaxed the checks so that
	GimpStringArray deals correctly with (length == 0 && data != NULL).
	Fixes bug #340365.
2006-05-03 14:15:01 +00:00
Sven Neumann d091dbb072 allow Merge operations on single layers as suggested in bug #340491.
2006-05-03  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-merge.c: allow Merge operations on single
	layers as suggested in bug #340491.
2006-05-03 07:43:04 +00:00
Sven Neumann a75fc42af0 fixed signal connection.
2006-04-29  Sven Neumann  <sven@gimp.org>

	* app/dialogs/user-install-dialog.c: fixed signal connection.

	* app/core/gimp-user-install.c: indentation.
2006-04-29 01:05:32 +00:00
Sven Neumann 7debd74dc6 define GIMP_APP_VERSION.
2006-04-29  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am (AM_CPP_FLAGS): define GIMP_APP_VERSION.

	* app/core/gimp-user-install.c: use GIMP_APP_VERSION instead of
	hardcoding it.
2006-04-29 00:47:53 +00:00
Sven Neumann 01251c6d88 app/core/Makefile.am new files based on code that used to live in
2006-04-29  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimp-user-install.[ch]: new files based on code that
	used to live in user-install-dialog.c.

	* app/dialogs/user-install-dialog.[ch]: only the dialog code
	remained here.

	* app/app_procs.c: use the new user-install API.  Perform a
	non-interactive user installation when running without a display.
2006-04-29 00:24:48 +00:00
Michael Natterer f1c3e79a4b app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps
2006-04-29  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-types.h
	* app/plug-in/gimppluginmanager.[ch]: new object which keeps all
	plug-in related stuff that was kept in the Gimp instance. Has
	"menu-branch-added" and "last-plug-in-changed" signals.

	* app/plug-in/plug-ins.[ch]: removed, all its functions are in
	GimpPlugInManager now.

	* app/core/gimpmarshal.list: new marshaller for the new object.

	* app/core/gimp.[ch]: removed all plug-in related stuff and keep a
	GimpPlugInManager around.

	* app/plug-in/plug-in-data.[ch]
	* app/plug-in/plug-in-file.[ch]
	* app/plug-in/plug-in-help-domain.[ch]
	* app/plug-in/plug-in-locale-domain.[ch]
	* app/plug-in/plug-in-menu-branch.[ch]
	* app/plug-in/plug-ins-query.[ch]: removed...

	* app/plug-in/gimppluginmanager-data.[ch]
	* app/plug-in/gimppluginmanager-file.[ch]
	* app/plug-in/gimppluginmanager-help-domain.[ch]
	* app/plug-in/gimppluginmanager-locale-domain.[ch]
	* app/plug-in/gimppluginmanager-menu-branch.[ch]
	* app/plug-in/gimppluginmanager-query.[ch]: ...and added as
	methods of GimpPlugInManager.

	* app/plug-in/plug-in-debug.[ch]
	* app/plug-in/plug-in-shm.[ch]: removed...

	* app/plug-in/gimpplugindebug.[ch]
	* app/plug-in/gimppluginshm.[ch]: ...and added as properly
	namespeced structs with constructors and destructors.

	* app/core/Makefile.am
	* app/core/gimpenvirontable.[ch]
	* app/core/gimpinterpreterdb.[ch]: removed...

	* app/plug-in/gimpenvirontable.[ch]
	* app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all
	related stuff.

	* app/actions/plug-in-actions.[ch]: connect to the
	plug-in-manager's "menu-path-added" signal and create menu branch
	actions accordingly.

	* app/plug-in/plug-in-context.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/app_procs.c
	* app/actions/file-commands.c
	* app/actions/plug-in-commands.c
	* app/core/gimpimage.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/file/file-open.c
	* app/gui/gui.c
	* app/menus/plug-in-menus.c
	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpthumbbox.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/progress.pdb
	* tools/pdbgen/pdb/undo.pdb: follow above refactoring.

	* app/pdb/context_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/help_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/progress_cmds.c
	* app/pdb/undo_cmds.c: regenerated.
2006-04-28 22:26:51 +00:00
Michael Natterer 305ada6354 new function which returns string arrays of all registered locale domains
2006-04-27  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-locale-domain.[ch] (plug_in_locale_domains):
	new function which returns string arrays of all registered locale
	domains and paths.

	(plug_in_standard_locale_domain): removed this function. The
	standard plug-in domain is included in the domains returned by
	plug_in_locale_domains().

	* app/plug-in/plug-ins.c (plug_ins_init): simply bind the text
	domains here instead of calling gimp_menus_init(). Destroy
	gimp->plug_in_defs much earlier.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: removed gimp_menus_init().

	* app/menus/plug-in-menus.[ch]: removed plug_in_menus_init(),
	binding text domains is completely done in the core now.
2006-04-27 21:53:33 +00:00
Michael Natterer ee66f2f31d Added some signals inspired by Rockwalrus' libpdb:
2006-04-27  Michael Natterer  <mitch@gimp.org>

	Added some signals inspired by Rockwalrus' libpdb:

	* app/pdb/gimppdb.[ch]: added signals "register-procedure" and
	"unregister-procedure".

	* app/pdb/gimppluginprocedure.[ch]: added signal "menu-path-added".

	* app/actions/plug-in-actions.[ch]
	* app/menus/plug-in-menus.[ch]: connect to the new signals and
	create/destroy plug-in actions and menus accordingly. Made all
	needed functions private and merged some of them with the newly
	added signal callbacks.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: removed gimp_menus_create_item() and
	gimp_menus_delete_item() and all related stuff.

	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c: removed calls to the removed functions.

	* app/plug-in/plug-ins.c (plug_ins_init): add the plug-in
	procedures to the PDB *after* calling gimp_menus_init() so their
	locale domains are properly initialized when the menus are
	created.
2006-04-27 19:36:13 +00:00
Sven Neumann 9120cb78c1 fixed argument order for using GIMP_CONFIG_INSTALL_PROP_RGB().
2006-04-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontext.c: fixed argument order for using
	GIMP_CONFIG_INSTALL_PROP_RGB().
2006-04-27 19:26:40 +00:00
Sven Neumann e779cf0b0f added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct
2006-04-27  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB.
	Made the GimpParamSpecRGB struct public. When validating a color,
	only look at the alpha channel if has_alpha is set.

	* libgimpconfig/gimpconfig-params.h: added "has_alpha" to
	GIMP_CONFIG_INSTALL_PROP_RGB macro definition.

	* libgimpconfig/gimpconfig-serialize.c: serialize color values as
	"(rgb r g b)" if the param-spec indicates that the alpha channel
	is meaningless.

	* app/config/gimpconfig-dump.c: take "has_alpha" into account when
	documenting color properties.

	* app/core/gimpcontext.c
	* app/core/gimpgrid.c
	* app/display/gimpdisplayoptions.c
	* app/text/gimptext.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpcolorbar.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c: specify whether color properties
	have an alpha channel.

	* tools/pdbgen/app.pl: handle "has_alpha" for color paramaters.

	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/grid.pdb
	* tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where
	appropriate.

	* app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set
	"has_alpha" to TRUE for GIMP_PDB_COLOR.

	* app/pdb/channel_cmds.c
	* app/pdb/context_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/grid_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/palette_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/selection_tools_cmds.c: regenerated.

	* app/config/gimpdisplayconfig.c (gimp_display_config_class_init):
	removed unused code.
2006-04-27 15:19:59 +00:00
Sven Neumann a779b9b302 added newlines.
2006-04-26  Sven Neumann  <sven@gimp.org>

	* app/base/siox.c (depth_first_search): added newlines.

	* app/core/gimpimage-contiguous-region.c: added const qualifiers.
2006-04-26 14:18:10 +00:00
Michael Natterer f65bd53e58 app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all
2006-04-26  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/pdb-types.h
	* app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all
	procedures and functions to register and run them. Renamed all
	functions and did some cleanups.

	* app/pdb/gimp-pdb.[ch]
	* app/core/gimp.[ch]: removed the same stuff here.

	* app/pdb/gimp-pdb-query.[ch]: removed these files...

	* app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB.

	* app/pdb/gimp-pdb-compat.h: fix include guard.

	* app/batch.c
	* app/actions/vectors-commands.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimphelp.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed includes and function
	calls accordingly.

	* tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp
	pointers to register the internal procedures with. Changed some
	newlines in the generated code.

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

	* app/core/gimppdbprogress.[ch]
	* app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY
	properties.

	* app/plug-in/plug-in-progress.c
	* app/gui/gui-vtable.c: pass gimp->pdb when creating them.

	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c: use the new local pdb pointers
	instead of some foo->bar->gimp->pdb overkill.
2006-04-26 09:13:47 +00:00
Sven Neumann f6eebeed6f app/core/gimpchannel.c (gimp_channel_real_border) added some empty lines
2006-04-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_real_border)
	* app/paint-funcs/paint-funcs.c (border_region): added some empty
	lines to improve readability.
2006-04-25 11:05:17 +00:00
Sven Neumann 234ff04638 initialize global variables. Fixes bug #338373.
2006-04-19  Sven Neumann  <sven@gimp.org>

	* plug-ins/jpeg/jpeg.c (run): initialize global variables. Fixes
	bug #338373.

	* plug-ins/jpeg/NEWS: removed.

	* app/core/gimpparamspecs.c: indentation.
2006-04-19 11:47:06 +00:00
Manish Singh d41f462885 do not return a value with void functions. Fixes bug #338904.
2006-04-18  Manish Singh  <yosh@gimp.org>

        * app/core/gimppickable.c (gimp_pickable_flush): do not return
        a value with void functions. Fixes bug #338904.
2006-04-18 17:48:27 +00:00
Sven Neumann e4c1dc0a5a app/actions/dialogs-commands.c app/config/gimpconfig-dump.c
2006-04-18  Sven Neumann  <sven@gimp.org>

	* app/actions/dialogs-commands.c
	* app/config/gimpconfig-dump.c
	* app/core/gimpcontext.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpparasitelist.c
	* app/display/gimpdisplayshell.c: avoid unnecessary relocations.
2006-04-18 10:08:10 +00:00
Manish Singh b206f60a4c void functions should not try to return values. Fixes bug #338792.
2006-04-18  Manish Singh  <yosh@gimp.org>

        * app/core/gimpparamspecs.c: void functions should not try to return
        values. Fixes bug #338792.
2006-04-18 07:32:01 +00:00
Michael Natterer 0855c2e12b added gimp_g_type_instance_get_memsize() and
2006-04-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch]: added
	gimp_g_type_instance_get_memsize() and
	gimp_g_param_spec_get_memsize().
	Changed gimp_g_object_get_memsize() to use
	gimp_g_type_instance_get_memsize().
	Handle more boxed types in gimp_g_value_get_memsize().

	* app/core/gimp.c (gimp_get_memsize): add the memsize of some
	members that are new or were forgotten.

	* app/pdb/gimpprocedure.c
	* app/pdb/gimppluginprocedure.c: implement GimpObject::get_memsize().
2006-04-15 15:15:33 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann ba5bbf1c48 app/units.c converted tabs to spaces.
2006-04-11  Sven Neumann  <sven@gimp.org>

	* app/units.c
	* app/core/gimp-contexts.c: converted tabs to spaces.
2006-04-11 12:54:09 +00:00
Michael Natterer d32d8c04db removed antique gimp_context_get_name() and _set_name().
2006-04-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.[ch]: removed antique
	gimp_context_get_name() and _set_name().

	* app/actions/vectors-commands.c: #include "gimp-utils.h"
2006-04-11 00:00:36 +00:00
Michael Natterer b2f2b7148d made plug_in_run_temp() public and changed its parameters to match the
2006-04-07  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-run.[ch]: made plug_in_run_temp() public and
	changed its parameters to match the ones of plug_in_run().

	* app/pdb/gimpprocedure.[ch]: added GimpProcedure::execute_async()
	which takes an additional display_ID parameter and returns nothing.

	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c: implement it, using
	plug_in_run() and plug_in_run_temp().

	* app/core/gimp-utils.[ch]: added gimp_value_array_truncate()
	which takes a GValueArray and the number of values to truncate the
	array to.

	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/pdb/gimp-pdb.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimphelp.c: use gimp_procedure_execute_async()
	instead of plug_in_run() and don't #include "plug-in-run.h".
	Truncate GValueArray passed to plug-ins again, and don't just pass
	some default values to the noninteractive args.

	Unrelated:

	* tools/pdbgen/pdb/plug_in.pdb: don't call
	gimp_menus_create_branch() here.

	* app/plug-in/plug-ins.c (plug_ins_menu_branch_add): call it here
	instead.

	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-07 18:23:20 +00:00
Michael Natterer a5bc7b0815 added "guint disconnected : 1", we have enough space for flags now.
2006-04-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.h: added "guint disconnected : 1", we
	have enough space for flags now.

	* app/core/gimpobject.c (gimp_object_dispose): use the new
	object->disconnected flag instead of attaching that boolean to the
	object.
2006-04-07 15:39:17 +00:00
Sven Neumann 5fc9bd4096 app/actions/tool-options-commands.c app/core/gimp.c
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/actions/tool-options-commands.c
	* app/core/gimp.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpcontext.c
	* app/core/gimpdatafactory.c
	* app/core/gimpgradient-load.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimplist.c
	* app/core/gimppalette.c
	* app/dialogs/template-options-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/paint/gimp-paint.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptoolbox-dnd.c: use gimp_object_set_static_name()
	and gimp_object_take_name() where appropriate.
2006-04-07 10:51:22 +00:00
Michael Natterer c03c336ccf added flag "guint static_name : 1" and new APIs
2006-04-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.[ch]: added flag "guint static_name : 1" and
	new APIs gimp_object_set_static_name() and _take_name().

	* app/pdb/gimpprocedure.[ch]: removed member "name". Use
	GimpObject's name instead.

	* app/actions/plug-in-actions.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/menus/plug-in-menus.c
	* app/pdb/gimp-pdb-query.c
	* app/pdb/gimp-pdb.c
	* app/pdb/gimppluginprocedure.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins-query.c
	* app/plug-in/plug-ins.c
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: use GimpObject API to set/get
	a procedure's name.

	* app/pdb/*_cmds.c: regenerated.
2006-04-07 10:04:27 +00:00
Sven Neumann cfd7233bc2 renamed gimp_drawable_shadow() to gimp_drawable_get_shadow_tiles().
2006-04-07  Sven Neumann  <sven@gimp.org>

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

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

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

	* app/pdb/color_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-04-07 09:50:23 +00:00
Sven Neumann eababf4891 renamed gimp_drawable_cmap() to gimp_drawable_get_colormap() and let it
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_cmap() to
	gimp_drawable_get_colormap() and let it return a const array.

	* app/core/gimpdrawable-convert.c
	* app/core/gimpimage-convert.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-preview.c: changed accordingly.
2006-04-07 09:30:37 +00:00
Sven Neumann cef9db57fe renamed gimp_drawable_data() to gimp_drawable_get_tiles().
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_data() to
	gimp_drawable_get_tiles().

	[lots of files]: changed accordingly.
2006-04-07 09:21:18 +00:00
Michael Natterer 5f211479ac ref all registered procedures.
2006-04-07  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimp-pdb.c (gimp_pdb_register)
	(gimp_pdb_unregister): ref all registered procedures.

	* app/xcf/xcf.c
	* tools/pdbgen/app.pl: unref newly created procedures after
	registering them.

	* app/core/gimp.[ch]: renamed member "plug_in_proc_defs" to
	"plug_in_procedures". Renamed "proc_def" variables to "procedure".

	* app/actions/plug-in-actions.c
	* app/menus/plug-in-menus.c: changed accordingly.

	* app/plug-in/plug-ins.[ch]: keep a reference to all procs which
	are in gimp->plug_in_procedures.

	(plug_ins_exit): unref them all and free the list. Apparently we
	were leaking them before on exit.

	* app/plug-in/plug-in-def.[ch]: s/proc_defs/procedures/. Ref
	procedures added with plug_in_def_add_procedure(). Added
	plug_in_def_remove_procedure() which unrefs them again. Removed
	"free_proc_defs" parameter from plug_in_def_free() and always
	unref the procedures.

	* app/plug-in/plug-in.[ch]: added plug_in_add_temp_proc() and
	plug_in_remove_temp() proc. Ref the added procedures.

	* app/plug-in/plug-in-message.c: use the new APIs instead of
	adding/removing procs and temp procs from their lists manually.
	Unref the newly created procedure after adding then to the
	plug_in_def or plug_in.

	* app/plug-in/plug-in-rc.[ch]
	* app/plug-in/plug-ins-query.c
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-04-07 08:16:26 +00:00
Sven Neumann e43b8ea082 allow to discard invisible layers as suggested in bug #337557.
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-merge.[ch] (gimp_image_merge_visible_layers):
	allow to discard invisible layers as suggested in bug #337557.

	* app/actions/image-commands.c
	* app/dialogs/image-merge-layers-dialog.[ch]: added a check button
	to the Merge Visible Layers dialog to control the new feature.

	* app/file/file-open.c
	* tools/pdbgen/pdb/image.pdb: pass FALSE for the new parameter.

	* app/pdb/image_cmds.c: regenerated.
2006-04-07 08:01:02 +00:00
Sven Neumann 37da566934 app/core/gimpcontext.c app/core/gimpimage.c app/paint-funcs/paint-funcs.c
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontext.c
	* app/core/gimpimage.c
	* app/paint-funcs/paint-funcs.c
	* app/widgets/gimpcontrollerkeyboard.c
	* app/widgets/gimpcontrollerwheel.c
	* app/widgets/gimpcursor.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdockbook.c
	* app/widgets/gimpdockseparator.c
	* libgimp/gimpbrushselect.c
	* libgimp/gimpfontselect.c
	* libgimp/gimpgradientselect.c
	* libgimp/gimppaletteselect.c
	* libgimp/gimppatternselect.c
	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimpstock.c: sprinkled some const qualifiers.
2006-04-06 12:43:58 +00:00
Sven Neumann 6f8f925c69 app/core/gimpdata.c (gimp_data_error_quark)
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.c (gimp_data_error_quark)
	* libgimpconfig/gimpconfig-error.c (gimp_config_error_quark)
	* libgimpthumb/gimpthumb-error.c (gimp_thumb_error_quark):
	g_quark_from_static_string() is already reasonably fast, not much
	point in caching the result.
2006-04-06 12:07:18 +00:00
Michael Natterer 7e258dfa27 app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed...
2006-04-06  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-types.h
	* app/plug-in/plug-in-proc-def.[ch]: removed...

	* app/pdb/Makefile.am
	* app/pdb/pdb-types.h
	* app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized
	get_progname().

	* app/pdb/gimptemporaryprocedure.[ch]: new class derived from
	GimpPlugInProcedure.

	* app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union
	exec_method and all the structs it needed. Procedure execution is
	properly virtualized now. Removed gimp_procedure_initialize() and
	grow the args and values arrays dynamically in
	gimp_procedure_add_argument()/return_value(). Added marshal_func
	parameter to gimp_procedure_new().

	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/core/gimp-gui.c
	* app/dialogs/file-save-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c
	* app/plug-in/plug-in-def.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins-query.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimppluginaction.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/app.pl: changed accordingly.

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

	* app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 10:01:30 +00:00
Sven Neumann 7679f4adba minor code cleanup, renamed a function, declared some functions as static.
2006-04-05  Sven Neumann  <sven@gimp.org>

	* app/base/lut-funcs.[ch]: minor code cleanup, renamed a function,
	declared some functions as static.

	* app/core/gimpdrawable-equalize.c: changed accordingly.
2006-04-05 21:03:39 +00:00
Tor Lillqvist 188ec11206 Check if object->name is NULL before attempting to pass it to
2006-04-05  Tor Lillqvist  <tml@novell.com>

	* app/core/gimpobject.c (gimp_object_get_memsize): Check if
	object->name is NULL before attempting to pass it to
	g_strdup_printf(). Use "anonymous" for unnamed objects.
2006-04-05 12:26:25 +00:00
Michael Natterer 086d0b6371 app/plug-in/plug-in-types.h renamed to GimpPlugInProcedure and made a
2006-04-05  Michael Natterer  <mitch@gimp.org>

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

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

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

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

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-05 08:38:33 +00:00
Michael Natterer a184c9090b app/pdb/Makefile.am app/pdb/procedural_db.[ch] removed...
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/procedural_db.[ch]
	* app/pdb/procedural-db-query.[ch]: removed...

	* app/pdb/gimp-pdb.[ch]
	* app/pdb/gimp-pdb-query.[ch]: ...and added namespacefied.

	* app/batch.c
	* app/actions/vectors-commands.c
	* app/core/gimp.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in-proc-def.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-ins-query.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-04-04 17:47:22 +00:00
Michael Natterer 17aada110c app/pdb/pdb-types.h removed struct GimpArgument, struct GimpArgumentSpec,
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h
	* app/pdb/gimpargument.[ch]: removed struct GimpArgument, struct
	GimpArgumentSpec, gimp_argument_init() and
	gimp_arguments_destroy().

	* app/pdb/gimpprocedure.h (struct GimpProcedure): use arrays of
	GParamSpec* for kepping proc inargs/outargs.

	* app/pdb/gimpprocedure.[ch]
	* app/pdb/procedural_db.[ch]
	* app/plug-in/plug-in-params.[ch]
	* app/plug-in/plug-in-proc-frame.[ch]
	* app/plug-in/plug-in-run.[ch]: use GValueArrays for procedure
	arguments and return values. Removed all n_args and n_return_vals
	parameters because GValueArrays know their length.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/pdb/procedural-db-query.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimppdbdialog.[ch]
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Also
	removed #include "gimpargument.h" from most files.

	* app/pdb/*_cmds.c: regenerated.
2006-04-04 10:30:58 +00:00
Michael Natterer 070a3625ad added a shitload of new GTypes and corresponding GParamSpecs to use them
2006-04-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: added a shitload of new GTypes and
	corresponding GParamSpecs to use them as PDB arguments.
	Each GimpPDBArgType has one or more corresponding GTypes in the
	core now.

	* app/pdb/gimpargument.[ch] (struct GimpArgument)
	(struct GimpArgumentSpec): removed "value" member because the
	GValue's/GParamSpec's GType carries just as much information now.

	(gimp_argument_type_to_pdb_arg_type): new function which maps
	GTypes to GimpPDBArgType.

	(gimp_pdb_arg_type_to_string): formerly known as
	procedural_db_type_name().

	* app/pdb/gimpprocedure.[ch]
	* app/pdb/procedural_db.[ch]: completely switch to GValue. Use the
	new GParamSpecs for procedure arguments. GimpPDBArgType is only
	used for adding compat args/values of plug-in procedures.

	(procedural_db_run_proc): the va_list expects a sequence of
	(GType, value, GType, value, ..., G_TYPE_NONE) now.

	* app/plug-in/plug-in-params.[ch]: changed accordingly.

	(plug_in_param_defs_check): removed this function.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install): use
	plug_in_proc_args_check() instead and initialize the GimpProcedure
	before doing so.

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb.pl: use the new param spec types and their
	utility functions. Changed argument/value registration
	accordingly.

	* app/pdb/procedural-db-query.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-04-03 20:54:55 +00:00
Michael Natterer 5fb387ea1b removed the return value again.
2006-04-02  Michael Natterer  <mitch@gimp.org>

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

	(gimp_parasite_list_find): return a const parasite.

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

	(*_parasite_find): return a const parasite.

	* app/core/gimptemplate.c
	* app/text/gimptextlayer-xcf.c
	* app/xcf/xcf-load.c: changed accordingly.
2006-04-02 15:37:25 +00:00
Michael Natterer 5e28089de9 use "const GimpParasite*" insted of gpointer for the parasite parameter.
2006-04-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-undo-push.[ch]
	(gimp_image_undo_push_image,item_parasite): use "const GimpParasite*"
	insted of gpointer for the parasite parameter.

	* app/core/gimpparasitelist.[ch] (gimp_parasite_list_add): added
	const to the parasite parameter, return the actually added
	parasite (which is a copy).

	* app/core/gimpunit.[ch] (_gimp_unit_new): added const to all
	string parameters.
2006-04-02 14:44:32 +00:00
Michael Natterer 8a856045f9 removed GIMP_TYPE_PARASITE, GIMP_TYPE_PARAM_PARASITE and the GimpRGB
2006-04-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: removed GIMP_TYPE_PARASITE,
	GIMP_TYPE_PARAM_PARASITE and the GimpRGB utility functions. Some
	fixes/cleanup in the new array and string array code.

	* libgimpbase/gimpbase.def
	* libgimpbase/gimpparasite.[ch]
	* libgimpcolor/gimpcolor.def
	* libgimpcolor/gimprgb.[ch]: added the parasite and rgb stuff here.

	* app/pdb/gimpargument.c: #include "libgimpbase/gimpbase.h"

	* app/pdb/procedural_db.c: removed unused variable.
2006-04-02 09:39:46 +00:00
Michael Natterer d05d512d9c added struct GimpArray which can keep static or allocated data. Added
2006-04-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: added struct GimpArray which can
	keep static or allocated data. Added boxed types GIMP_TYPE_ARRAY
	and GIMP_TYPE_STRING_ARRAY. Added GParamSpecs for PDB int32,
	int16, int8, float and string arrays. Added functions to get, dup,
	set and set_static the various arrays from/to GValues.

	* app/pdb/gimpprocedure.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-in-params.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb.pl: use the new param pspecs and gimp_value
	functions to keep arrays in GimpArguments.

	* app/pdb/gimpargument.[ch] (gimp_arguments_destroy): removed
	parameter "gboolean full_destroy". It's not needed any longer
	because the GValues fully memory-manage all their data now.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/dialogs/print-size-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-handlers.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.

	* app/pdb/brush_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/buffer_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/fonts_cmds.c
	* app/pdb/gimpargument.c
	* app/pdb/gimpargument.h
	* app/pdb/gimpprocedure.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/parasite_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/pattern_cmds.c
	* app/pdb/patterns_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/procedural_db.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/selection_tools_cmds.c
	* app/pdb/vectors_cmds.c: regenerated.

	... and ported everything to perl btw...
2006-04-01 01:33:28 +00:00
Michael Natterer 03c28ec7fc app/pdb/pdb-types.h renamed struct Argument to GimpArgument and struct
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h
	* app/pdb/gimpargument.h: renamed struct Argument to GimpArgument
	and struct ProcArg to GimpArgumentSpec.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/pdb/gimpargument.c
	* app/pdb/gimpprocedure.[ch]
	* app/pdb/procedural-db-query.c
	* app/pdb/procedural_db.[ch]
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.[ch]
	* app/plug-in/plug-in-proc-frame.h
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimppdbdialog.[ch]
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 20:16:22 +00:00
Michael Natterer 46a50b7e36 app/pdb/Makefile.am moved Argument and ProcArg structs and functions to
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/gimpargument.[ch]: moved Argument and ProcArg structs
	and functions to these new files. Renamed functions to
	gimp_argument_foo().

	* app/pdb/procedural_db.[ch]: removed them here.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/pdb/gimpprocedure.c
	* app/pdb/procedural_db_cmds.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: changed #includes and function
	calls accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 19:28:53 +00:00
Sven Neumann bb28d144d7 use "gtk-dialog-question" instead of "gimp-wilber-eek" to indicate a
2006-03-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf): use
	"gtk-dialog-question" instead of "gimp-wilber-eek" to indicate a
	missing thumbnail.
2006-03-31 09:44:20 +00:00
Michael Natterer 1dac27836d app/pdb/Makefile.am new files containing the functions operating on *one*
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/gimpprocedure.[ch]: new files containing the functions
	operating on *one* procedure. Factored out of procedural_db.[ch]
	and renamed to gimp_procedure_foo().

	* app/pdb/procedural_db.[ch]: removed them here.

	* app/pdb/procedural-db-query.c
	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.[ch]
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/app.pl: changed #includes and function calls
	accordingly. No logic changed.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 09:15:08 +00:00
Michael Natterer 4b24ca376f don't memset(0) the array of return values if the procedure didn't
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_execute_proc): don't
	memset(0) the array of return values if the procedure didn't
	succeed. GValues don't like to be treated like that and I don't
	understand what the memsetting is good for. It just looks like a
	very bad hack.

	* app/file/file-open.c: additionally, don't access return_vals[>0]
	unless the procedure returned successfully.

	* app/core/gimppdbprogress.c
	* app/widgets/gimppdbdialog.c: procedural_db_run_proc() always
	returns non-NULL, no need to check for it.
2006-03-30 13:00:17 +00:00
Sven Neumann 0b30918226 need to include glib.h before using G_OS_WIN32 2006-03-30 10:22:35 +00:00
Sven Neumann acc84675a5 added gimp_get_temp_filename().
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-utils.[ch]: added gimp_get_temp_filename().

	* tools/pdbgen/pdb/fileops.pdb (temp_name): removed the
	implementation here and call gimp_get_temp_filename() instead.

	* app/pdb/fileops_cmds.c: regenerated.
2006-03-30 10:17:41 +00:00
Michael Natterer 55578d0d3e renamed member "arg_type" to "type".
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.h (structs Argument and ProcArg): renamed
	member "arg_type" to "type".

	* app/pdb/procedural_db.c
	* app/pdb/procedural-db-query.c
	* app/actions/plug-in-commands.c
	* app/core/gimppdbprogress.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/fileops_cmds.c
	* app/pdb/procedural_db_cmds.c: regenerated.
2006-03-30 10:06:54 +00:00
Sven Neumann 1c88d72f8e return FALSE in case of a valid parasite.
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimpparamspecs.c (gimp_param_parasite_validate): return
	FALSE in case of a valid parasite.
2006-03-30 08:57:20 +00:00
Michael Natterer afd88f0bf4 replace the value union by a GValue.
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch] (struct Argument): replace the value
	union by a GValue.

	(procedural_db_argument_init)
	(procedural_db_compat_arg_init): new functions to initialize
	an Argument. They call g_value_init() on the Argument's value.

	(procedural_db_arguments)
	(procedural_db_return_values): initialize the returned Argument
	arrays so their GValues are ready to use. Allow to get the
	(unsuccessful) return values of a NULL ProcRecord.

	(procedural_db_destroy_args): g_value_unset() the values. Added a
	"gboolean full_destroy" parameter. Its only effect is to destroy
	PDB arrays, everything else is nicely memory managed by GValue.

	(procedural_db_execute)
	(procedural_db_run_proc): do GValue stuff. Added n_args and
	n_return_vals parameters to execute().

	(procedural_db_execute_proc): private function to execute a
	procedure. Validates the passed in arguments using the registered
	GParamSpecs before passing them to the resp. exec method.

	* app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs
	an array of ProcArgs now in order to initialize the Arguments'
	GValues correctly. Passing NULL ProcArgs uses
	procedural_db_compat_arg_init(), so procedures (plug-ins)
	returning more values than expected work.

	(plug_in_args_to_params): do GValue stuff here too.

	(plug_in_args_destroy): removed this function,
	procedural_db_destroy_args() does the same now.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run):
	simplified quite a bit because everything returns n_return_values
	now. Call plug_in_params_to_args() only of the procedure was found.

	(plug_in_handle_proc_return_priv): pass ProcRecs to
	plug_in_params_to_args().

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-ins.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.[ch]
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't
	g_new/g_free Argument arrays, always use procedural_db_foo()
	functions. Use GValue functions to get/set Arguments.

	* tools/pdbgen/pdb.pl: added get_value_func and set_value_func to
	all PDB types. Removed id_func, id_ret_func and check_func. Added
	flags which indicated that a type is an ID. Removed unused utility
	functions.

	* tools/pdbgen/lib.pl: use the flag instead of looking at
	functions and value types.

	* tools/pdbgen/app.pl: use the get_value_func and set_value_func
	to marshal inargs and outargs. Removed all checks performed on
	inargs because that's done by GParamSpec validation now. Added the
	missing bits to register excluded values with GimpParamSpecEnum.

	* app/pdb/*_cmds.c: regenerated.
2006-03-29 23:56:07 +00:00
Michael Natterer b469509570 added GimpParamSpecEnum, which is a GParamSpecEnum plus the possibility to
2006-03-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: added GimpParamSpecEnum, which is
	a GParamSpecEnum plus the possibility to exclude values.
	Fixed lots of validation functions.
	Made all structs and macros public.
2006-03-29 21:56:44 +00:00
Sven Neumann 5439aa4995 did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gdisp -> display substitution.
2006-03-28 17:55:52 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00
Michael Natterer aead1803be reordered params to be consistent with other param specs.
2006-03-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch] (gimp_param_spec_string): reordered
	params to be consistent with other param specs.

	(gimp_value_get_rgb): utility function which reads the value
	into a GimpRGB struct, instead of returning a pointer.

	(gimp_value_set_rgb): added for symmetry. Just calls
	g_value_set_boxed().
2006-03-28 15:46:39 +00:00
Michael Natterer 762bfb22b5 app/core/Makefile.am new unused files. Checked in so they can be easily
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpparamspecs.[ch]: new unused files. Checked in so
	they can be easily reviewed.
2006-03-27 15:48:17 +00:00
Michael Natterer 2a227a1aee app/base/base-enums.h app/core/core-enums.h register some more enums.
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/base/base-enums.h
	* app/core/core-enums.h
	* app/plug-in/plug-in-enums.h: register some more enums.

	* app/plug-in/Makefile.am: added rules to generate plug-in-enums.c

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/plug-in/plug-in-enums.c: (re)generated.
2006-03-27 13:49:19 +00:00
Sven Neumann f40e8e8a51 app/actions/colormap-editor-actions.c
2006-03-24  Sven Neumann  <sven@gimp.org>

	* app/actions/colormap-editor-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/palette-editor-actions.c
	* app/core/gimp-edit.c
	* app/core/gimpchannel-select.c: some more string changes, mainly
	avoiding the use of FG and BG in labels where there's no need for
	being concise.
2006-03-24 11:01:24 +00:00
Sven Neumann d65622407a renamed from "Rect Select" to "Rectangle Select" (bug #335715).
2006-03-24  Sven Neumann  <sven@gimp.org>

        * app/tools/gimprectselecttool.c: renamed from "Rect Select" to
        "Rectangle Select" (bug #335715).

        * app/core/gimpchannel-select.c (gimp_channel_select_rectangle):
        string change (bug #335715).

        * plug-ins/common/svg.c: follow the change to the file format
        label done in the shared-mime-info package (bug #335716).

        * configure.in: fixed the --without-libtiff case in the summary
        (bug #335764).
2006-03-24 08:15:01 +00:00
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