Commit Graph

103 Commits

Author SHA1 Message Date
Michael Natterer ca1fb7b700 turn c_style_procedure_names() in $proc->{help} into
2006-05-19  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: turn c_style_procedure_names() in
	$proc->{help} into 'canonical-procedure-names'.

	* tools/pdbgen/pdb/color.pdb: std_pdb_deprecated() expects
	canonical procedure names.

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/progress_cmds.c: regenerated.
2006-05-19 12:58:27 +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 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
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
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
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
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
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
Michael Natterer ee0ebc0915 made it a GObject. Removed member "static_proc". Renamed
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch]: made it a GObject. Removed member
	"static_proc". Renamed gimp_procedure_init() to
	gimp_procedure_initialize().

	* app/pdb/gimp-pdb.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: changed accordingly.

	* tools/pdbgen/app.pl: register all internal procs
	dynamically. The static proc structs are gone.

	* tools/pdbgen/pdb/fileops.pdb: cosmetic change.

	* app/pdb/*_cmds.c: regenerated.
2006-04-04 21:11:45 +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 810f5dc40c remove newline flood.
2006-04-03  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: remove newline flood.

	* app/pdb/internal_procs.c: regenerated shorter.
2006-04-03 17:42:02 +00:00
Michael Natterer 20946c66bd added a const_type member to all PDB types, Removed casts from all
2006-04-02  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb.pl: added a const_type member to all PDB types,
	Removed casts from all get_value_funcs which return const
	pointers, they can stay const now.

	* tools/pdbgen/app.pl: use the const_type to declare input args.

	* app/pdb/gimpprocedure.h: pass const arguments to the internal
	marshallers.

	* app/xcf/xcf.c: changed accordingly.

	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/paths.pdb: added some const qualifiers.

	* tools/pdbgen/lib.pl: use the const_type for input args instead
	of adding the const qualifier based on the type.

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

	Unrelated:

	* app/pdb/gimpargument.c (gimp_arguments_destroy): no need any
	more to destroy the argument array in reverse order (we don't need
	access to the previous element because arrays in GValues memory
	manage themselves now).
2006-04-02 16:03:32 +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 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 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 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 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 72f2afd98e factored out a utility function. I need it in another pretty messed up
2006-03-25  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: factored out a utility function. I need it
	in another pretty messed up tree ;)
2006-03-24 23:34:55 +00:00
Michael Natterer 0de4f68090 tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb
2006-03-25  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/gradient.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/plug_in.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb
	* tools/pdbgen/pdb/text_tool.pdb: removed all ':' before and all
	'()' around %%desc%%.

	* tools/pdbgen/app.pl: add () to int32, float and boolean
	descriptions automatically. They all look the same now.

	* tools/pdbgen/lib.pl: tweaked regex so %%desc%% doesn't appear in
	libgimp API docs.

	* app/pdb/brush_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/channel_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/context_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c
	* app/pdb/text_tool_cmds.c
	* libgimp/gimpedit_pdb.c
	* libgimp/gimpplugin_pdb.c: regenerated.
2006-03-24 23:23:21 +00:00
Michael Natterer 328345dc92 tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb
2006-03-24  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/gradient.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/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/undo.pdb
	* tools/pdbgen/pdb/vectors.pdb: replaced 'True', 'true' and
	'non-zero' by 'TRUE' where appropriate. Added %%desc%% to enum arg
	descriptions where missing. Get object names using
	gimp_object_get_name(). Set 'success' more consistently. Removed
	{ } from all enum arg descriptions...

	* tools/pdbgen/app.pl (make_arg_recs): ...and add the { }
	generically here. Removed some code that replaced the ',' by 'or'
	for enums without { } so all enums are now documented the same.

	* app/pdb/<some>_cmds.c
	* libgimp/<some>_pdb.c: regenerated.
2006-03-24 21:57:47 +00:00
Michael Natterer 6768419668 removed support for invoke->pass_through.
2006-03-22  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: removed support for invoke->pass_through.

	* tools/pdbgen/pdb/fileops.pdb: added a C utility function and
	call it from both register_load_handler() and
	register_magic_load_handler() instead of letting the generated
	invokers call each other.

	* app/pdb/fileops_cmds.c: regenerated.
2006-03-22 20:17:45 +00:00
Michael Natterer 1effc52dc5 removed support for arg->cond.
2006-03-21  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: removed support for arg->cond.

	* tools/pdbgen/edit.pdb
	* tools/pdbgen/image.pdb: move its logic into the C code.

	* app/pdb/edit_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-03-21 16:13:27 +00:00
Michael Natterer 706dfab164 remove some code that has no effect on the generated code any more.
2006-03-19  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: remove some code that has no effect on the
	generated code any more.
2006-03-19 13:21:55 +00:00
Michael Natterer 81fbb521bf tools/pdbgen/app.pl got rid of the unused arg->no_id_lookup.
2006-03-18  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/progress.pdb: got rid of the unused
	arg->no_id_lookup.

	* tools/pdbgen/pdb/plug_in.pdb: flattened a forgotten foreach().
2006-03-18 14:43:11 +00:00
Michael Natterer bc95134436 removed support for arg->on_success and arg->on_fail.
2006-03-18  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: removed support for arg->on_success and
	arg->on_fail.

	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/selection_tools.pdb: moved their logic to the C
	code.

	* app/pdb/gradient_select_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/selection_tools_cmds.c: regenerated.
2006-03-18 10:28:39 +00:00
Michael Natterer a03ff204fc generically map NULL to -1 when returning object IDs.
2006-03-17  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb.pl: generically map NULL to -1 when returning
	object IDs.

	* tools/pdbgen/app.pl: remove support for "return_fail => foo"
	which did the same on a per-return-value basis. Removed some more
	obscure perl without any effect on the generated code.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/text_tool.pdb: don't use "return_fail => foo".

	* app/pdb/channel_cmds.c
	* app/pdb/display_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/transform_tools_cmds.c
	* app/pdb/vectors_cmds.c: regenerated.
2006-03-17 14:09:20 +00:00
Michael Natterer 04bf6d04f4 define init values for all pdb types.
2006-03-15  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb.pl: define init values for all pdb types.

	* tools/pdbgen/app.pl: unconditionally initialize all return
	values, and no parameter.

	* tools/pdbgen/pdb/*.pdb: removed init => 1 from all arguments
	and return values.

	* app/pdb/*_cmds.c: regenerated.
2006-03-15 15:32:39 +00:00
Michael Natterer 59771587ae tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb
2006-03-15  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/pattern.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only*
	variables for arguments and return values and declare all local
	variables inside the C code. Removed lots of alias => '<expression>'
	and no_declare => 1 stuff from return values, instead let pdbgen
	declare the variables and assign them manually in the C code.
	More cleanup.

	* tools/pdbgen/app.pl: removed support for proc->vars.

	* app/pdb/brush_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/context_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/palette_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/pattern_cmds.c
	* app/pdb/patterns_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimpbrush_pdb.c
	* libgimp/gimpbrushes_pdb.c
	* libgimp/gimpgradient_pdb.c
	* libgimp/gimpgradients_pdb.c
	* libgimp/gimppalette_pdb.c
	* libgimp/gimppalettes_pdb.c
	* libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 12:49: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 bc36159ab1 store canonical names of proc names and args in the proc structure.
2005-08-05  Manish Singh  <yosh@gimp.org>

        * tools/pdbgen/pdbgen.pl: store canonical names of proc names and
        args in the proc structure.

        * tools/pdbgen/app.pl
        * tools/pdbgen/lib.pl: use the above.

        * app/pdb/*_cmds.c: regenerated.
2005-08-05 18:19:09 +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 6f42c42db4 changed new member "deprecated" from "gboolean" to a "gchar*" which holds
2004-10-06  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.h (struct ProcRecord): changed new member
	"deprecated" from "gboolean" to a "gchar*" which holds the name of
	the replacement procedure.

	* tools/pdbgen/app.pl: changed accordingly.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): show
	the name of the replacement procedure in the warning message.

	* tools/pdbgen/stddefs.pdb: added utility function
	std_pdb_deprecated() which takes the name of the replacement
	procedure and fills the blurb, help, author, copyright, date and
	deprecated fields of the procedure definition.

	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/text_tool.pdb: use it instead of duplicating
	the same code and strings for all deprecated procedures.

	* app/pdb/*_cmds.c: regenerated.
2004-10-06 13:13:08 +00:00
Michael Natterer 7ed9a2885c return the mask's bpp and the brush's pixmap data if it has one.
2004-10-06  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb: return the mask's bpp and the
	brush's pixmap data if it has one.

	* tools/pdbgen/pdb/pattern.pdb: cleaned up.

	* tools/pdbgen/pdb/image.pdb: added $deprecated = 1 to deprecated
	functions even if they are not exported to libgimp any more.

	* app/pdb/procedural_db.h (struct ProcRecord): added member
	"gboolean deprecated".

	* tools/pdbgen/app.pl
	* app/xcf/xcf.c: fill it accordingly.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): warn
	not only for deprecated procedured which are in the compat hach
	table, but also for procedures with deprecated flag set to TRUE.

	* app/pdb/*_cmds.c
	* libgimp/gimpbrush_pdb.[ch]
	* libgimp/gimppattern_pdb.[ch]: regenerated.

	* libgimp/gimpbrushmenu.c
	* plug-ins/gfig/gfig-style.c: changed accordingly.
2004-10-06 03:23:09 +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 a456ac9bde include "libgimpbase/gimpbase.h" instead of "libgimpbase/gimpparasite.h"
2004-07-16  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb.pl: include "libgimpbase/gimpbase.h" instead of
	"libgimpbase/gimpparasite.h" for getting the GimpParasite type.

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/guides.pdb
	* tools/pdbgen/pdb/image.pdb: removed redundant #includes.

	* tools/pdbgen/pdb/plug_in.pdb: standardized "success" logic.
	Consistetly fail if there is no currently queried plugin.

	* app/pdb/*.c: regenerated.
2004-07-16 14:43:56 +00:00
Michael Natterer 2176afbbbb Removed any remaining GUI dependency from the PDB wrappers:
2004-07-10  Michael Natterer  <mitch@gimp.org>

	Removed any remaining GUI dependency from the PDB wrappers:

	* app/core/gimp.[ch]: added vtable entries for the display and
	help stuff.

	* app/widgets/gimphelp.[ch]: renamed gimp_help() to
	gimp_help_show().

	* app/gui/gui-vtable.c: implement the new display and help vtable
	entries.

	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/help.pdb: use the new functions of the Gimp
	object instead of using stuff from display/ and widgets/.

	* tools/pdbgen/app.pl: removed bad hacks which enabled including
	stuff from gui/, display/ and widgets/.

	* app/Makefile.am: link widgets-enums.o, display-enums.o and
	gimpdisplayoptions.o into the gimp-console binary because they are
	needed for the config system and don't depend on any GUI stuff.

	* app/pdb/Makefile.am: s/GTK_CFLAGS/GDK_PIXBUF_CFLAGS/

	* app/pdb/display_cmds.c
	* app/pdb/help_cmds.c: regenerated.
2004-07-10 20:29:11 +00:00
Manish Singh 61a3b04825 make libgimp* headers always included before any app headers.
2004-05-06  Manish Singh  <yosh@gimp.org>

        * tools/pdbgen/pdb/app.pl: make libgimp* headers always included
        before any app headers.

        * tools/pdbgen/pdb/paint_tools.pdb: Fix silly "Dodgebure" typo.

        * app/pdb/*_cmds.c: regenerated.
2004-05-06 23:26:45 +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
Michael Natterer 77447984cc added "gboolean removed" to the GimpItem struct. Defaults to FALSE. Set it
2004-03-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: added "gboolean removed" to the GimpItem
	struct. Defaults to FALSE. Set it to TRUE in gimp_item_removed().
	Added public function gimp_item_is_removed().

	* app/core/gimpimage-undo-push.c (undo_pop_layer)
	(undo_pop_layer_mask) (undo_pop_channel) (undo_pop_vectors):
	set it to FALSE manually when re-adding something from the
	undo stack.

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb.pl: don't allow any operation on items which
	are removed from the image (and exist on the undo stack only).
	Fixes bug #138311.

	* app/pdb/channel_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/parasite_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2004-03-28 14:20:57 +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