Commit Graph

75 Commits

Author SHA1 Message Date
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 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
Michael Natterer fe90ae768b app/pdb/pdb-types.h renamed struct ProcRecord to GimpProcedure. Added
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h
	* app/pdb/gimpprocedure.h: renamed struct ProcRecord to
	GimpProcedure. Added GIMP_IS_PROCEDURE() which checks for != NULL.

	* app/pdb/gimpprocedure.c
	* app/pdb/procedural-db-query.c
	* app/pdb/procedural_db.[ch]
	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/file/file-open.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.h
	* app/plug-in/plug-in-proc-frame.[ch]
	* 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-in.[ch]
	* app/plug-in/plug-ins-query.c
	* app/plug-in/plug-ins.[ch]
	* app/widgets/gimphelp.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/app.pl: changed accordingly. Renamed 'proc_rec' and
	similarily named variables and parameters to 'procedure'.

	* tools/pdbgen/pdb/procedural_db.pdb: changed 'procedure'
	parameters to 'procedure_name'.

	* app/pdb/*_cmds.c
	* libgimp/gimpproceduraldb_pdb.[ch]: regenerated.
2006-03-31 17:42:13 +00:00
Michael Natterer 3cb830519c added new member "gboolean static_strings", so the ProcRecord struct and
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.h (struct ProcRecord): added new member
	"gboolean static_strings", so the ProcRecord struct and its
	strings can be marked as static separately.

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_dispose): removed.

	(gimp_procedure_free): don't free the struct if it's static.

	(gimp_procedure_set_strings)
	(gimp_procedure_set_static_strings)
	(gimp_procedure_take_strings): new functions to set a procedure's
	strings.

	* app/pdb/procedural_db.c (procedural_db_free_entry): simply call
	gimp_procedure_free() on all procedures, the memory-manage
	themselves now.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install): use
	gimp_procedure_set_strings() instead of setting them manually.

	* app/xcf/xcf.c: register gimp-xcf-load and gimp-xcf-save
	dynamically so further ProcRecord struct changes don't affect this
	file.

	* tools/pdbgen/app.pl: set "static_proc" to TRUE for static procs.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 16:17:07 +00:00
Michael Natterer 8cffac44d5 added new member "gboolean static_proc" which indicates whether a
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch] (struct ProcRecord): added new member
	"gboolean static_proc" which indicates whether a ProcRecord struct
	and its strings are static.

	(gimp_procedure_dispose): new function which frees the procedure's
	args and values, and its strings if it is not static.

	* app/xcf/xcf.c
	* tools/pdbgen/app.pl: set "static_proc" to TRUE for static procs.

	* app/pdb/procedural_db.c (procedural_db_free): call
	gimp_procedure_free() or gimp_procedure_dispose(), depending on
	procedure->static_proc.

	* app/pdb/procedural_db.h: removed #if 0'ed cruft.

	* app/plug-in/plug-in-proc-def.[ch]: removed
	plug_in_proc_def_get_proc().

	* app/file/file-open.c
	* app/file/file-save.c
	* tools/pdbgen/pdb/fileops.pdb: access proc_def->procedure directly.

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 14:00:50 +00:00
Michael Natterer 49da8cb2d1 added gimp_procedure_new() and gimp_procedure_free() functions.
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch]: added gimp_procedure_new() and
	gimp_procedure_free() functions.

	* app/plug-in/plug-in-proc-def.h (struct PlugInProcDef): use a
	ProcRecord pointer instead of including the entire struct.

	* app/plug-in/plug-in-proc-def.c: use the new() and free()
	functions above to allocate/free the ProcRecord.

	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/menus/plug-in-menus.c
	* 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/plug-in/plug-ins.c
	* app/xcf/xcf.c: changed accordingly.

	Unrelated:

	* app/pdb/gimpprocedure.c (gimp_procedure_execute): be more verbose
	when warning about out-of-bounds parameter values.

	* tools/pdbgen/pdb/fileops.pdb: allow GIMP_RUN_WITH_LAST_VALS for
	file_save because indirect saving (e.g. remote or compressed)
	needs it.

	* app/pdb/fileops_cmds.c: regenerated.
2006-03-31 11:49:22 +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
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
Michael Natterer 9a6273f94c also unref the ProcRecord's GParamSpecs.
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_free_entry): also
	unref the ProcRecord's GParamSpecs.
2006-03-30 09:05:04 +00:00
Sven Neumann 7aec70ebad actually free the memory allocated for the procedure entry.
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_free_entry): actually
	free the memory allocated for the procedure entry.
2006-03-30 08:00:54 +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 0d383b1830 switch to g_return_val_if_fail() because it got a return value.
2006-03-29  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_init_proc): switch to
	g_return_val_if_fail() because it got a return value.
2006-03-29 21:47:49 +00:00
Michael Natterer 396f92b86c return the procedure.
2006-03-29  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch] (procedural_db_init_proc): return the
	procedure.

	* tools/pdbgen/app.pl: use a local ProcRecord* variable so the
	generated code becomes more readable.

	* app/pdb/*_cmds.c: regenerated.
2006-03-29 20:27:46 +00:00
Michael Natterer 7d180818c8 replace "name" and "description" by a GParamSpec.
2006-03-28  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch] (struct ProcArg): replace "name"
	and "description" by a GParamSpec.

	(procedural_db_init_proc)
	(procedural_db_add_argument)
	(procedural_db_add_return_value)
	(procedural_db_add_compat_arg)
	(procedural_db_add_compat_val): new functions which dynamically
	allocate and register arguments and return value arrays based on
	GParamSpecs.

	* app/pdb/procedural-db-query.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.c
	* app/plug-in/plug-in-rc.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* tools/pdbgen/app.pl: get rid of all ProcArg arrays and generate
	code that registers args and values with the procedures.

	* app/pdb/*_cmds.c: regenerated.
2006-03-28 19:58:00 +00:00
Michael Natterer d7dc875d0d argh, get types from procedure->args, not procedure->values.
2006-03-28  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_arguments): argh, get
	types from procedure->args, not procedure->values.
2006-03-27 22:57:25 +00:00
Michael Natterer 169faefb18 renamed procedural_db_return_args() to procedural_db_return_values() and
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch]: renamed procedural_db_return_args()
	to procedural_db_return_values() and added
	procedural_db_arguments(), which returns a newly allocated,
	initialized array of the procedure's arguments.

	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/plug-in/plug-in-run.c
	* app/widgets/gimphelp.c
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly, some cleanup.

	* app/pdb/*_cmds.c: regenerated.
2006-03-27 21:09:32 +00:00
Michael Natterer 2c0834953e pass the ProcRecord as first parameter, so marshallers have access to
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.h (ArgMarshal): pass the ProcRecord as
	first parameter, so marshallers have access to their ProcRecord
	without the need for global variables.

	* app/pdb/procedural_db.c
	* tools/pdbgen/app.pl: changed addordingly.

	* tools/pdbgen/app.pl: removed support for invoke->proc. Introduce
	invoke->no_marshalling instead which indicates that invoke->code
	should be used literally as marshaller code, without any
	substitutions or generated variables.

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

	* app/pdb/*_cmds.c: regenerated.
2006-03-27 19:32:19 +00:00
Michael Natterer df7eee5207 some fixes and more robustness:
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_run_proc): some fixes and
	more robustness:

	- Procedures return proc->num_values + 1 return values, not only
	  proc->num_values.
	- Allocate the Argment array with g_new0 and initialize all its
	  types before parsing the va_list.
	- Stop parsing the va_list on GIMP_PDB_END, so passing less
	  parameters is possible.
	- Cleanup switch() cases.
2006-03-27 10:53:25 +00:00
Michael Natterer b8c25287f9 return a proper CALLING_ERROR on parameter type mispatch, not just NULL.
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_run_proc): return a
	proper CALLING_ERROR on parameter type mispatch, not just NULL.

	* app/pdb/procedural_db.h: removed unused struct NetExec.
2006-03-27 09:32:39 +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
Michael Natterer a0d231b33c renamed GIMP_PDB_PATH to GIMP_PDB_VECTORS and add the former as an alias
2005-12-29  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): renamed
	GIMP_PDB_PATH to GIMP_PDB_VECTORS and add the former as an alias
	for the latter.

	* libgimp/gimp.h (union _GimpParamData): added back d_path member
	to maintian source compatibility.

	* tools/pdbgen/pdb.pl
	* libgimp/gimp.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-in-params.c
	* libgimpbase/gimpprotocol.[ch]
	* plug-ins/pygimp/pygimp-pdb.c
	* plug-ins/script-fu/siod-wrapper.c: s/GIMP_PDB_PATH/GIMP_PDB_VECTORS/

	* app/pdb/image_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/vectors_cmds.c
	* libgimp/gimpimage_pdb.c
	* libgimp/gimpvectors_pdb.c
	* tools/pdbgen/enums.pl: regenerated.
2005-12-29 01:07:02 +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
Michael Natterer 853f04d5a6 Changed naming scheme for PDB procedure names from
2005-08-03  Michael Natterer  <mitch@gimp.org>

	Changed naming scheme for PDB procedure names from
	random_crap_that_traditionally_has_underscores to
	enforced-canonical-identifiers. I'm pretty sure some things are
	broken after this commit. More changes to come...

	* libgimpbase/gimpbase.def
	* libgimpbase/gimputils.[ch]: added gimp_canonicalize_identifier().

	* app/pdb/procedural_db.[ch] (struct ProcRecord): added
	"gchar *original_name" to keep a procedure's original name as
	reigstered by plug-ins (compat cruft).

	(procedural_db_init_procs): canonicalized list of deprecated
	procedures.

	* app/plug-in/plug-in-proc-def.c (plug_in_proc_def_free): free
	original_name.

	* app/plug-in/plug-in-message.c: canonicalize procedure names
	which are received over the wire.

	* app/plug-in/plug-in-rc.c: serialize the original_name and create
	the canonicalized name on-the-fly when deserializing.

	* app/plug-in/plug-in-run.c: pass the original_name to plug-ins
	when running them because they strcmp() the passed procedure name.

	* app/plug-in/plug-ins.c (plug_ins_add_to_db): pass
	canonical procedure names to procedural_db_execute().

	(plug_ins_file_proc_compare): special-case "gimp-xcf", not "gimp_xcf".

	* app/xcf/xcf.c: changed static XCF procedures accordingly.

	* tools/pdbgen/app.pl
	* tools/pdbgen/lib.pl: do some trivial substitutions to generate
	canonicalized names in app/, and C identifiers with underscores in
	libgimp/.

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: canonicaloized procedure
	names in calls to std_pdb_deprecated() and in procedure names in
	generated C code.

	* app/pdb/*_cmds.c
	* libgimp/*_pdb.c: regenerated.
2005-08-02 22:52:23 +00:00
Michael Natterer 02abc41cdf sorted list of deprecated procedures so deprecations since 2.0 and 2.2 are
2005-07-13  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_init_procs): sorted list
	of deprecated procedures so deprecations since 2.0 and 2.2 are
	grouped together.
2005-07-13 15:52:18 +00:00
Michael Natterer 20b4769cf5 app/actions/layers-actions.c app/actions/layers-commands.[ch]
2005-07-10  Michael Natterer  <mitch@gimp.org>

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

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

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

	* plug-ins/common/colortoalpha.c
	* plug-ins/common/iwarp.c
	* plug-ins/common/psd.c
	* plug-ins/common/psd_save.c
	* plug-ins/common/psp.c
	* plug-ins/common/rotate.c
	* plug-ins/common/threshold_alpha.c
	* plug-ins/common/vpropagate.c
	* plug-ins/script-fu/scripts/3d-outline.scm
	* plug-ins/script-fu/scripts/alien-glow-bar.scm
	* plug-ins/script-fu/scripts/alien-glow-bullet.scm
	* plug-ins/script-fu/scripts/alien-glow-logo.scm
	* plug-ins/script-fu/scripts/basic1-logo.scm
	* plug-ins/script-fu/scripts/basic2-logo.scm
	* plug-ins/script-fu/scripts/beveled-pattern-button.scm
	* plug-ins/script-fu/scripts/blend-anim.scm
	* plug-ins/script-fu/scripts/blended-logo.scm
	* plug-ins/script-fu/scripts/bovinated-logo.scm
	* plug-ins/script-fu/scripts/burn-in-anim.scm
	* plug-ins/script-fu/scripts/carved-logo.scm
	* plug-ins/script-fu/scripts/chalk.scm
	* plug-ins/script-fu/scripts/chip-away.scm
	* plug-ins/script-fu/scripts/comic-logo.scm
	* plug-ins/script-fu/scripts/coolmetal-logo.scm
	* plug-ins/script-fu/scripts/crystal-logo.scm
	* plug-ins/script-fu/scripts/drop-shadow.scm
	* plug-ins/script-fu/scripts/gimp-headers.scm
	* plug-ins/script-fu/scripts/gimp-labels.scm
	* plug-ins/script-fu/scripts/glowing-logo.scm
	* plug-ins/script-fu/scripts/gradient-bevel-logo.scm
	* plug-ins/script-fu/scripts/image-structure.scm
	* plug-ins/script-fu/scripts/neon-logo.scm
	* plug-ins/script-fu/scripts/perspective-shadow.scm
	* plug-ins/script-fu/scripts/starburst-logo.scm
	* plug-ins/script-fu/scripts/starscape-logo.scm
	* plug-ins/script-fu/scripts/textured-logo.scm
	* plug-ins/script-fu/scripts/title-header.scm
	* plug-ins/script-fu/scripts/waves-anim.scm
	* plug-ins/xjt/xjt.c: changed accordingly.
2005-07-10 21:17:22 +00:00
Sven Neumann dd44b9b9ef if we end up without any return values, assume an execution error instead
2005-06-24  Sven Neumann  <sven@gimp.org>

	* app/pdb/procedural_db.c (procedural_db_execute): if we end up
	without any return values, assume an execution error instead of
	crashing (bug #308904).
2005-06-24 15:00:34 +00:00
Michael Natterer d831bdb367 app/pdb/procedural_db.h removed pdb_type_name() uglyness.
2005-05-14  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.h
	* tools/pdbgen/pdb/procedural_db.pdb: removed pdb_type_name()
	uglyness.

	* app/pdb/procedural_db.c: add private function
	procedural_db_type_name() instead which uses gimp_enum_get_value()
	and always returns a newly allocated string. Use it for the error
	messages.

	* app/pdb/procedural_db_cmds.c: regenerated.
2005-05-13 23:36:45 +00:00
Michael Natterer 4caf20c229 tools/pdbgen/pdb/image.pdb entirely removed the deprecated functions
2004-11-16  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/selection.pdb: entirely removed the deprecated
	functions "selection_clear", "image_set_cmap" and "image_get_cmap".

	* app/pdb/procedural_db.c: and added them to the compat hash table
	because they have undeprecated replacements with identical
	signature.

	* libgimp/gimpselection.[ch]: added gimp_selection_clear() here
	instead because we need the symbol in libgimp.

	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/selection_cmds.c
	* libgimp/gimpselection_pdb.[ch]: regenerated.
2004-11-16 14:34:34 +00:00
Michael Natterer 46989bc717 tools/pdbgen/pdb/brushes.pdb tools/pdbgen/pdb/gradients.pdb
2004-09-23  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb: removed the foos_set_foo()
	procedures and marked the foos_set_foo() ones as deprecated. For
	brushes, patterns and palettes, added foos_get_foo_info()
	procedures which work like foos_get_foo_data() but return just the
	properties, not the actual data. Allow NULL or "" to be passed
	as name to all functions (use the current brush, pattern etc.
	in this case).

	* tools/pdbgen/pdb/fonts.pdb: cleanup.

	* app/pdb/procedural_db.c: added the removed ones to the compat
	hash table.

	* libgimp/Makefile.am
	* libgimp/gimpbrushes.[ch]
	* libgimp/gimpgradients.[ch]
	* libgimp/gimppalettes.[ch]
	* libgimp/gimppatterns.[ch]: new files with compat functions
	wich call the resp. gimp_context_*() functions.

	* libgimp/gimp.h: changed accordingly.

	* app/pdb/brushes_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/palettes_cmds.c
	* app/pdb/patterns_cmds.c
	* libgimp/gimpbrushes_pdb.[ch]
	* libgimp/gimpgradients_pdb.[ch]
	* libgimp/gimppalettes_pdb.[ch]
	* libgimp/gimppatterns_pdb.[ch]: regenerated.

	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/gfig/gfig-dialog.c
	* plug-ins/gfig/gfig-style.[ch]
	* plug-ins/gflare/gflare.c: changed accordingly.
2004-09-23 15:05:48 +00:00
Michael Natterer 81256e0087 removed the opacity and paint_mode functions...
2004-09-22  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brushes.pdb: removed the opacity and paint_mode
	functions...

	* tools/pdbgen/pdb/context.pdb: ...and added them here.

	* app/pdb/procedural_db.c: added them to the pdb_compat hash table.

	* libgimp/Makefile.am
	* libgimp/gimpbrushes.[ch]: new files with compat functions
	which call the gimp_context_*() functions.

	* libgimp/gimp.h: changed accordingly.

	* app/pdb/brushes_cmds.c
	* app/pdb/context_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpbrushes_pdb.[ch]
	* libgimp/gimpcontext_pdb.[ch]: regenerated.
2004-09-22 19:22:24 +00:00
Michael Natterer 35b372ea08 tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb
2004-09-22  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/groups.pl
	* tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group...

	* tools/pdbgen/pdb/context.pdb: and added its functions to the
	"Context" namespace instead.

	* app/pdb/Makefile.am
	* app/pdb/palette_cmds.c: removed.

	* app/pdb/procedural_db.c: added them to the pdb_compat hash table.

	* libgimp/Makefile.am
	* libgimp/gimppalette_pdb.[ch]: removed.

	* libgimp/gimppalette.[ch]: new files holding compat functions
	which call gimp_context_*() functions.

	* libgimp/gimp.h
	* libgimp/gimpui.c: changed accordingly.

	* app/pdb/context_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpcontext_pdb.[ch]: regenerated.

	* plug-ins/MapObject/mapobject_image.c
	* plug-ins/MapObject/mapobject_preview.c
	* plug-ins/common/apply_lens.c
	* plug-ins/common/blinds.c
	* plug-ins/common/borderaverage.c
	* plug-ins/common/checkerboard.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/cubism.c
	* plug-ins/common/exchange.c
	* plug-ins/common/film.c
	* plug-ins/common/gif.c
	* plug-ins/common/grid.c
	* plug-ins/common/mapcolor.c
	* plug-ins/common/mblur.c
	* plug-ins/common/mng.c
	* plug-ins/common/mosaic.c
	* plug-ins/common/papertile.c
	* plug-ins/common/png.c
	* plug-ins/common/polar.c
	* plug-ins/common/semiflatten.c
	* plug-ins/common/sinus.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/vpropagate.c
	* plug-ins/common/warp.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/gfig/gfig-style.c
	* plug-ins/gfli/gfli.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/maze/handy.c
	* plug-ins/pagecurl/pagecurl.c
	* plug-ins/pygimp/gimpmodule.c
	* plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-22 18:43:09 +00:00
Michael Natterer fc01210b78 removed #if 0'ed code, took assignments out of if()-conditions, minor
2004-09-16  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c: removed #if 0'ed code, took assignments
	out of if()-conditions, minor cleanup.
2004-09-16 10:32:30 +00:00
Michael Natterer 02d2b990f5 Redid the whole internal progress stuff: don't pass around
2004-08-10  Michael Natterer  <mitch@gimp.org>

	Redid the whole internal progress stuff: don't pass around
	progress_callback and progress_data; instead, provide a
	pointer to a GimpProgressInterface which can be implemented
	by a variety of backends.

	Addresses (but not yet fixes) bugs #6010, #97266 and #135185.

	* app/display/Makefile.am
	* app/display/gimpprogress.[ch]: removed the old progress hack.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpprogress.[ch]: implement GimpProgressInterface.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpprogressdialog.[ch]: the standalone progress
	dialog as widget implementing GimpProgressInterface.

	* app/display/gimpdisplay.c
	* app/display/gimpstatusbar.[ch]
	* app/widgets/gimpfiledialog.[ch]
	* app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface
	implementation to these classes.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: replaced the old progress vtable entries
	by two new to create and destroy a GimpProgressDialog in case
	no other progress is available.

	* app/pdb/procedural_db.[ch]
	* app/plug-in/plug-in-run.[ch]
	* tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and
	all plug-ins.

	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-ins.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c: handle the case there the
	plug-in was crated with a progress as well as the case where it
	wasn't.

	* app/app_procs.c
	* app/batch.c
	* app/xcf/xcf.c
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/widgets/gimphelp.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c: changed accordingly.

	* app/core/gimpimagefile.[ch]
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/file-open-dialog.c
	* app/gui/file-open-location-dialog.c
	* app/gui/file-save-dialog.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file
	related functions. Embed the progress in the file dialog where
	possible.

	* app/core/gimpdrawable-blend.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpimage-convert.[ch]
	* app/core/gimpimage-flip.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/core/gimpimage-rotate.[ch]
	* app/core/gimpimage-scale.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c: replaced callback/data by GimpProgress.

	* app/tools/gimpblendtool.c
	* app/tools/gimptransformtool.c
	* app/gui/convert-dialog.c
	* app/actions/documents-commands.c
	* app/actions/file-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb: changed callers accordingly.

	* app/pdb/*_cmds.c: regenerated.
2004-08-10 18:47:21 +00:00
Michael Natterer a2b85a62b0 new function which clears the whole list of data set by plug-ins.
2004-07-26  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.[ch] (procedural_db_free_data): new
	function which clears the whole list of data set by plug-ins.

	(procedural_db_free): use it.

	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.[ch]: added action, callback and
	confirmation dialog for "Reset all filters to default values".
	Somehow addresses bug #81015.

	* app/widgets/gimphelp-ids.h: added a help ID for the new action.

	* menus/image-menu.xml.in: added it to the "Filters" submenu.
2004-07-26 21:07:15 +00:00
Michael Natterer dd9cb1c99c #include <glib-object.h> instead of <gtk/gtk.h>.
2004-07-09  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.c: #include <glib-object.h> instead of
	<gtk/gtk.h>.
2004-07-09 19:26:34 +00:00
Pedro Gimeno c8d982c1bf Cleanups. (gimp_rect_select_tool_coords_to_integer): Undo my bogus fix for
2004-04-30  Pedro Gimeno  <pggimeno@wanadoo.es>

	* app/tools/gimprectselecttool.c: Cleanups.
	(gimp_rect_select_tool_coords_to_integer): Undo my bogus fix for
	bug #138103, which led to bug #140649.

	* app/pdb/procedural_db.c (procedural_db_init_procs): Add missing
	compat procs: gimp_channel_ops_duplicate, gimp_channel_ops_offset.
2004-04-30 19:14:37 +00:00
Michael Natterer 837fa4294d Context cleanup continued:
2004-04-15  Michael Natterer  <mitch@gimp.org>

	Context cleanup continued:

	* app/core/gimpitem.[ch]: added context parameter to
	GimpItem::stroke().

	* app/core/gimpchannel.c (gimp_channel_stroke)
	* app/vectors/gimpvectors.c (gimp_vectors_stroke): use it to get
	default values from instead of gimp_get_user_context().

	* app/core/gimpselection.c
	* app/gui/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

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

	* app/plug-in/plug-in.[ch]: added GimpContext member to the PlugIn
	struct. Added context parameter to plug_in_new(),
	plug_in_call_query() and plug_in_call_init().

	* app/plug-in/plug-in-run.[ch]: added context parameters to
	plug_in_run() and plug_in_repeat().

	* app/gui/plug-in-commands.c
	* app/gui/vectors-commands.c
	* app/pdb/procedural_db.c
	* app/widgets/gimphelp.c: pass a context to plug_in_run() and
	plug_in_repeat().

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): call
	procedures with the plug-in's context.

	* app/plug-in/plug-ins.c: use a temporary context for running the
	plug-ins' query() and init() functions. Use the same context for
	running automatic extensions. This temporarily separates the main
	Script-Fu extension from the user context (i.e. scripts have no
	way of setting/getting the global FG, BG, brush etc.).
2004-04-15 13:10:51 +00:00
Michael Natterer 18d9161eea Get rid of the "current_context" which was in fact just a bunch of global
2004-04-15  Michael Natterer  <mitch@gimp.org>

	Get rid of the "current_context" which was in fact just a bunch of
	global variables. Instead, pass the needed context all the way
	from the GUI and the PDB to the core. This is a prerequisite for
	macro recording and generally helps separating the various
	subsystems from each other. Work in progress...

	* app/core/gimp.[ch]: removed member "current_context" and
	gimp_[get|set]_current_context().

	* app/core/gimp-edit.[ch]
	* app/core/gimpdrawable-blend.[ch]
	* app/core/gimpdrawable-bucket-fill.[ch]
	* app/core/gimpdrawable-offset.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpimage-crop.[ch]
	* app/core/gimpimage-flip.[ch]
	* app/core/gimpimage-merge.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/core/gimpimage-rotate.[ch]
	* app/core/gimpimage.[ch]
	* app/core/gimpimagefile.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.[ch]
	* app/core/gimpselection.[ch]
	* app/core/gimptemplate.[ch]
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/pdb/procedural_db.[ch]
	* app/text/gimptext-compat.[ch]
	* app/text/gimptextlayer-transform.[ch]
	* app/gui/brush-select.[ch]
	* app/gui/font-select.[ch]
	* app/gui/gradient-select.[ch]
	* app/gui/palette-select.[ch]
	* app/gui/pattern-select.[ch]: added tons of "GimpContext *context"
	parameters and use the passed context instead of
	gimp_get_current_context().

	* app/app_procs.c
	* app/batch.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors.c
	* app/gui/convert-dialog.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/widgets/gimpdnd.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpthumbbox.c: pass gimp_get_user_context() or
	GIMP_CONTEXT(tool_options) or whatever is the right context
	to the changed core functions.

	* tools/pdbgen/app.pl: pass "GimpContext *context" to all
	generated PDB invokers.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.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/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: pass the new context
	parameter to the changed core functions.

	* app/pdb/*_cmds.c: regenerated.
2004-04-14 23:37:34 +00:00
Manish Singh 83cae1617a don't generate code with tabs.
2004-03-26  Manish Singh  <yosh@gimp.org>

        * tools/pdbgen/app.pl: don't generate code with tabs.

        * tools/pdbgen/pdb/procedural_db.pdb: convert tabs to spaces in
        helper function declaration.

        * app/pdb/procedural_db.c: convert tabs to spaces.

        * app/pdb/*.c: regenerated, no code changes, only tabs->spaces.
2004-03-26 16:49:18 +00:00
Michael Natterer b2e3434d38 tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "misc tools"
2004-01-05  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/groups.pl
	* tools/pdbgen/pdb/misc_tools.pdb: removed the "misc tools" PDB group.

	* tools/pdbgen/pdb/edit.pdb: added gimp_edit_bucket_fill() and
	gimp_edit_blend().

	* tools/pdbgen/pdb/image.pdb: added gimp_image_pick_color().

	* app/pdb/procedural_db.c
	* libgimp/gimpcompat.h: added compat stuff.

	* app/pdb/edit_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/misc_tools_cmds.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpedit_pdb.[ch]
	* libgimp/gimpimage_pdb.[ch]: regenerated.

	* libgimp/Makefile.am
	* libgimp/gimpmisctools_pdb.[ch]: removed.

	* plug-ins/gfig/gfig.c
	* plug-ins/script-fu/scripts/3dTruchet.scm
	* plug-ins/script-fu/scripts/alien-glow-arrow.scm
	* plug-ins/script-fu/scripts/alien-glow-bar.scm
	* plug-ins/script-fu/scripts/alien-glow-bullet.scm
	* plug-ins/script-fu/scripts/alien-glow-button.scm
	* plug-ins/script-fu/scripts/alien-glow-logo.scm
	* plug-ins/script-fu/scripts/basic1-logo.scm
	* plug-ins/script-fu/scripts/basic2-logo.scm
	* plug-ins/script-fu/scripts/beveled-button.scm
	* plug-ins/script-fu/scripts/blended-logo.scm
	* plug-ins/script-fu/scripts/burn-in-anim.scm
	* plug-ins/script-fu/scripts/coffee.scm
	* plug-ins/script-fu/scripts/comic-logo.scm
	* plug-ins/script-fu/scripts/coolmetal-logo.scm
	* plug-ins/script-fu/scripts/glossy.scm
	* plug-ins/script-fu/scripts/gradient-bevel-logo.scm
	* plug-ins/script-fu/scripts/gradient-example.scm
	* plug-ins/script-fu/scripts/hsv-graph.scm
	* plug-ins/script-fu/scripts/pupi-button.scm
	* plug-ins/script-fu/scripts/rendermap.scm
	* plug-ins/script-fu/scripts/sphere.scm
	* plug-ins/script-fu/scripts/starscape-logo.scm
	* plug-ins/script-fu/scripts/test-sphere.scm
	* plug-ins/script-fu/scripts/textured-logo.scm
	* plug-ins/script-fu/scripts/title-header.scm
	* plug-ins/script-fu/scripts/weave.scm: follow "blend" and "color
	picker" changes. Leave "bucket fill" users unchanged because fill
	and bucket_fill need another cleanup (will follow next...)

2004-01-05  Michael Natterer  <mitch@gimp.org>

	* libgimp/libgimp-sections.txt: moved color_picker, blend and
	bucket_fill to their new places.

	* libgimp/tmpl/gimpedit.sgml
	* libgimp/tmpl/gimpimage.sgml
	* libgimp/tmpl/gimptools.sgml: regenerated.
2004-01-05 14:35:19 +00:00
Michael Natterer 14c75713a6 renamed gimp_temp_PDB_name() to gimp_procedurab_db_temp_name()
2003-12-19  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/plug_in.pdb: renamed gimp_temp_PDB_name()
	* tools/pdbgen/pdb/procedural_db.pdb: to gimp_procedurab_db_temp_name()

	* app/pdb/procedural_db.c
	* libgimp/gimpcompat.h: added compat cruft.

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

	* libgimp/gimpbrushselect.c
	* libgimp/gimpfontselect.c
	* libgimp/gimpgradientselect.c
	* libgimp/gimppatternselect.c: changed accordingly.
2003-12-19 00:00:49 +00:00
Michael Natterer a046969687 renamed PDB function gimp_image_active_drawable() to
2003-12-08  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/image.pdb: renamed PDB function
	gimp_image_active_drawable() to gimp_image_get_active_drawable()
	so it's consistent with all other drawable getters.

	* app/pdb/procedural_db.c
	* libgimp/gimpcompat.h: added compat stuff.

	* app/pdb/image_cmds.c
	* libgimp/gimpimage_pdb.[ch]: regenerated.

	* plug-ins/pygimp/pygimp-image.c
	* plug-ins/script-fu/scripts/add-bevel.scm
	* plug-ins/script-fu/scripts/carved-logo.scm
	* plug-ins/script-fu/scripts/chrome-it.scm
	* plug-ins/script-fu/scripts/crystal-logo.scm
	* plug-ins/script-fu/scripts/round-corners.scm
	* plug-ins/script-fu/scripts/slide.scm
	* plug-ins/script-fu/scripts/sota-chrome-logo.scm: changed accordingly.

2003-12-08  Michael Natterer  <mitch@gimp.org>

	* libgimp/libgimp-sections.txt
	* libgimp/tmpl/gimpimage.sgml: updated.
2003-12-08 18:30:54 +00:00
Michael Natterer ca45a5c65a added enum GimpPDBCompatMode which can be one of { OFF, ON, WARN }.
2003-12-05  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h: added enum GimpPDBCompatMode which can
	be one of { OFF, ON, WARN }.

	* app/main.c: added --pdb-compat-mode command line option. Renamed
	--enable-stack-trace to --stack-trace-mode. Made default values of
	stack_trace_mode and pdb_compat_mode depend on GIMP_MINOR_VERSION
	(default to compat ON and stack_trace NEVER).

	* app/app_procs.[ch]: pass pdb_compat_mode to gimp_new().

	* app/core/gimp.[ch]: added pdb_compat_mode to the Gimp struct
	and to gimp_new().

	* app/pdb/procedural_db.c: leave the compat table empty for
	GIMP_PDB_COMPAT_OFF.

	* app/plug-in/plug-in-message.c: warn when a deprecated procedure
	is called for GIMP_PDB_COMPAT_WARN.

	* docs/gimp-1.3.1.in: changed accordingly.
2003-12-05 17:08:35 +00:00
Michael Natterer 3ad199d5b3 Name all PDB procedures which deal with floating selections consistently:
2003-12-05  Michael Natterer  <mitch@gimp.org>

	Name all PDB procedures which deal with floating selections
	consistently:

	* tools/pdbgen/pdb/image.pdb: renamed
	gimp_image_floating_selection() to gimp_image_get_floating_sel().

	* libgimp/gimplayer.h: removed gimp_layer_is_floating_selection #define.

	* libgimp/gimpcompat.h
	* app/pdb/procedural_db.c: added compat stuff.

	* app/pdb/image_cmds.c
	* libgimp/gimpimage_pdb.[ch]: regenerated.

	* plug-ins/common/curve_bend.c
	* plug-ins/common/film.c
	* plug-ins/common/rotate.c
	* plug-ins/pygimp/pygimp-image.c
	* plug-ins/xjt/xjt.c: changed accordingly.

2003-12-05  Michael Natterer  <mitch@gimp.org>

	* libgimp/libgimp-sections.txt
	* libgimp/tmpl/gimpimage.sgml
	* libgimp/tmpl/gimplayer.sgml: follow floating_sel cleanup.
2003-12-05 16:30:01 +00:00
Michael Natterer 2de8decd7e renamed gimp_drawable_bytes() to gimp_drawable_bpp() because all other
2003-12-05  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/drawable.pdb: renamed gimp_drawable_bytes() to
	gimp_drawable_bpp() because all other libgimp API speak in terms
	of "bpp" too.

	* libgimp/gimpdrawable.h: removed gimp_drawable_bpp #define.

	* app/pdb/procedural_db.c
	* libgimp/gimpcompat.h: added compat stuff.

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

	* plug-ins/common/pix.c
	* plug-ins/common/psd_save.c: changed accordingly.

2003-12-05  Michael Natterer  <mitch@gimp.org>

	* libgimp/libgimp-sections.txt
	* libgimp/tmpl/gimpdrawable.sgml: s/drawable_bytes/drawable_bpp/.
2003-12-05 14:51:11 +00:00
Michael Natterer bc1a085d3b removed gimp_image_undo_*() functions...
2003-12-05  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/image.pdb: removed gimp_image_undo_*() functions...

	* tools/pdbgen/pdb/undo.pdb: ...and added them here. Renamed
	gimp_undo_push_group_start,end() to
	gimp_image_undo_group_start,end().

	* app/pdb/procedural_db.c
	* libgimp/gimpcompat.h: added compat stuff for the old undo group API.

	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/undo_cmds.c
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimpundo_pdb.[ch]: regenerated.

	* plug-ins/common/align_layers.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/iwarp.c
	* plug-ins/common/jpeg.c
	* plug-ins/common/rotate.c
	* plug-ins/common/tile.c
	* plug-ins/common/zealouscrop.c
	* plug-ins/gfig/gfig.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/pagecurl/pagecurl.c
	* plug-ins/script-fu/scripts/*.scm: changed accordingly.

2003-12-05  Michael Natterer  <mitch@gimp.org>

	* libgimp/libgimp-sections.txt
	* libgimp/tmpl/gimpimage.sgml
	* libgimp/tmpl/gimpundo.sgml: follow undo API changes.
2003-12-05 14:18:47 +00:00