Commit Graph

7858 Commits

Author SHA1 Message Date
Michael Natterer 5e28089de9 use "const GimpParasite*" insted of gpointer for the parasite parameter.
2006-04-02  Michael Natterer  <mitch@gimp.org>

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

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

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

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

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

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

	* app/pdb/procedural_db.c: removed unused variable.
2006-04-02 09:39:46 +00:00
Karine Delvare a10a5713d7 don't automatically auto-shrink.
2006-04-01  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimpnewrectselecttool.c: don't automatically
	auto-shrink.
2006-04-01 10:46:21 +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 c1475c4adb changed "icon_data" from gchar* to guint8*.
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-proc-def.h (struct PlugInProcDef)
	(plug_in_proc_def_set_icon): changed "icon_data" from gchar* to
	guint8*.

	* app/plug-in/plug-in-proc-def.c
	* app/plug-in/plug-in-rc.c
	* app/xcf/xcf.c: cast a bit to the fix resulting warnings. There
	are less casts needed than before.
2006-03-31 14:34:02 +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
Sven Neumann 9996bb7a2e app/dialogs/Makefile.am app/dialogs/dialogs-types.h app/dialogs/dialogs.c
2006-03-31  Sven Neumann  <sven@gimp.org>

	* app/dialogs/Makefile.am
	* app/dialogs/dialogs-types.h
	* app/dialogs/dialogs.c
	* app/dialogs/info-dialog.[ch]: good bye InfoDialog.

	* app/tools/gimpperspectivetool.[ch]
	* app/tools/gimprotatetool.[ch]
	* app/tools/gimpsheartool.[ch]
	* app/tools/gimptransformtool.[ch]: use GimpToolDialog instead of
	InfoDialog and add the widgets manually.

	* app/tools/gimpscaletool.c: commented out use of InfoDialog. This
	tools still needs to be ported to GimpToolDialog.
2006-03-31 13:36:34 +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
Sven Neumann 20a48412bc fixed compiler warning and sprinkled some empty lines for readability.
2006-03-31  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-funcs.c: fixed compiler warning and
	sprinkled some empty lines for readability.
2006-03-31 10:17:23 +00:00
Michael Natterer 87e7cb1fe6 always set dockable->blurb to NULL, also if its memory is shared with
2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.c (gimp_dockable_destroy): always set
	dockable->blurb to NULL, also if its memory is shared with
	dockable->name.
2006-03-31 10:08:02 +00:00
Sven Neumann bb28d144d7 use "gtk-dialog-question" instead of "gimp-wilber-eek" to indicate a
2006-03-31  Sven Neumann  <sven@gimp.org>

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

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

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

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

	* app/pdb/*_cmds.c: regenerated.
2006-03-31 09:15:08 +00:00
Sven Neumann 0b12c776e0 use doubles for src coordinates. Added properties for "src-drawable",
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpclone.[ch]: use doubles for src coordinates. Added
	properties for "src-drawable", "src-x" and "src-y".

	* tools/pdbgen/pdb/paint_tools.pdb: resurrected cloning from
	drawables over the PDB. This used to be broken for quite a while.

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

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

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

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

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

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

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

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

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

	* app/pdb/fileops_cmds.c
	* app/pdb/procedural_db_cmds.c: regenerated.
2006-03-30 10:06:54 +00:00
Sven Neumann 0768628ac9 actually increment the tile counter used to limit the number of progress
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/base/siox.c (siox_foreground_extract): actually increment
	the tile counter used to limit the number of progress updates.
2006-03-30 09:59:27 +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 1c88d72f8e return FALSE in case of a valid parasite.
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimpparamspecs.c (gimp_param_parasite_validate): return
	FALSE in case of a valid parasite.
2006-03-30 08:57:20 +00:00
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 d69e93ceb1 can't just cast the GPParamDefs to ProcArgs any more, their struct layouts
2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-params.c (plug_in_param_defs_check): can't
	just cast the GPParamDefs to ProcArgs any more, their struct
	layouts are different now. Convert them into temporary ProcArgs
	before calling plug_in_proc_args_check()
2006-03-29 22:11:59 +00:00
Michael Natterer b469509570 added GimpParamSpecEnum, which is a GParamSpecEnum plus the possibility to
2006-03-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: added GimpParamSpecEnum, which is
	a GParamSpecEnum plus the possibility to exclude values.
	Fixed lots of validation functions.
	Made all structs and macros public.
2006-03-29 21:56:44 +00:00
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 393343acdc pass the filename, not a GimpImage to file_utils_filename_to_uri(). Fixes
2006-03-29  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/fileops.pdb (file_save): pass the filename, not
	a GimpImage to file_utils_filename_to_uri(). Fixes bug #336527.

	* app/pdb/fileops_cmds.c: regenerated.
2006-03-29 21:02:21 +00:00
Michael Natterer f580468cb0 fixed forgotten antique enum values (RGBA_GIMAGE -> GIMP_RGB_IMAGE etc.)
2006-03-29  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/drawable.pdb (drawable_type_with_alpha): fixed
	forgotten antique enum values (RGBA_GIMAGE -> GIMP_RGB_IMAGE etc.)

	* app/pdb/drawable_cmds.c: regenerated.
2006-03-29 20:44:28 +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
Sven Neumann 25f5647eee app/plug-in/plug-in-message.c app/plug-in/plug-in-params.c string review.
2006-03-29  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in.c: string review.
2006-03-29 10:45:18 +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
Sven Neumann fd0a61d5e1 allow dropping of dockables from the same dockbook to the empty space next
2006-03-28  Sven  Neumann  <sven@gimp.org>

	* app/widgets/gimpdockbook.c (gimp_dockbook_drop_dockable):
allow
	dropping of dockables from the same dockbook to the empty space
	next to the notebook tabs. This moves the dockable to the end.
2006-03-28 19:19:55 +00:00
Sven Neumann 86fd6f9ccd did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

        * app/*: did a global gdisp -> display substitution.
2006-03-28 17:59:18 +00:00
Sven Neumann 5439aa4995 did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

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

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

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

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

	(gimp_value_set_rgb): added for symmetry. Just calls
	g_value_set_boxed().
2006-03-28 15:46:39 +00:00
Michael Natterer 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
Sven Neumann 2c2e542e2a app/tools/gimpforegroundselectoptions.c use Ctrl to switch between
2006-03-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpforegroundselectoptions.c
	* app/tools/gimpforegroundselecttool.c: use Ctrl to switch between
	foreground and background refinement.
2006-03-27 18:35:42 +00:00
Karine Delvare 601e45ea5a allow modifier keys to work.
2006-03-27  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimpnewrectselecttool.c: allow modifier keys to work.
2006-03-27 17:58:11 +00:00
Michael Natterer 762bfb22b5 app/core/Makefile.am new unused files. Checked in so they can be easily
2006-03-27  Michael Natterer  <mitch@gimp.org>

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

	* app/paint/paint-enums.h: register GimpBrushApplicationMode.

	* app/paint/paint-enums.c
	* tools/pdbgen/enums.pl: regenerated.
2006-03-27 15:14:36 +00:00
Michael Natterer 2a227a1aee app/base/base-enums.h app/core/core-enums.h register some more enums.
2006-03-27  Michael Natterer  <mitch@gimp.org>

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

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

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/plug-in/plug-in-enums.c: (re)generated.
2006-03-27 13:49:19 +00:00
Michael Natterer 06524c33fc Should save before comitting... 2006-03-27 11:44:06 +00:00
Michael Natterer f313c6b577 app/file/file-open.c app/file/file-save.c use procedural_db_run_proc()
2006-03-27  Michael Natterer  <mitch@gimp.org>

	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-ins.c: use procedural_db_run_proc() instead of
	procedural_db_execute(). execute() should be avoided for anything
	but PDB-internal calls.
2006-03-27 11:40:00 +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