1. 30 Mar, 2006 1 commit
    • Michael Natterer's avatar
      don't memset(0) the array of return values if the procedure didn't · 4b24ca37
      Michael Natterer authored
      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.
  2. 29 Mar, 2006 1 commit
    • Michael Natterer's avatar
      replace the value union by a GValue. · afd88f0b
      Michael Natterer authored
      2006-03-30  Michael Natterer  <mitch@gimp.org>
      	* app/pdb/procedural_db.[ch] (struct Argument): replace the value
      	union by a GValue.
      	(procedural_db_compat_arg_init): new functions to initialize
      	an Argument. They call g_value_init() on the Argument's value.
      	(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_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
      	* 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
      	* 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.
  3. 18 Jan, 2006 1 commit
    • Michael Natterer's avatar
      Michael Natterer authored
      2006-01-18  Michael Natterer  <mitch@gimp.org>
      	* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
      	which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
      	* app/*/*.c: use them for all object properties so their
      	strings are not copied.
  4. 16 Dec, 2004 1 commit
  5. 13 Dec, 2004 1 commit
    • Michael Natterer's avatar
      don't forget the context we were created with but rmember it as · 91d07947
      Michael Natterer authored
      2004-12-13  Michael Natterer  <mitch@gimp.org>
      	* app/widgets/gimppdbdialog.[ch]: don't forget the context we
      	were created with but rmember it as pdb_dialog->caller_context.
      	* app/widgets/gimpbrushselect.c
      	* app/widgets/gimpfontselect.c
      	* app/widgets/gimpgradientselect.c
      	* app/widgets/gimppaletteselect.c
      	* app/widgets/gimppatternselect.c: use the caller_context when
      	calling the temp_proc so the temp_proc's stack frame doesn't
      	contain the dialog's private context (which is just a scratch
      	model for the container views) but the plug-in's real context
      	which is fully initialized. Fixes bug #161114.
  6. 09 Sep, 2004 1 commit
  7. 09 Jul, 2004 1 commit
    • Michael Natterer's avatar
      app/gui/Makefile.am app/gui/brush-select.[ch] app/gui/font-select.[ch] · 8d9e3622
      Michael Natterer authored
      2004-07-09  Michael Natterer  <mitch@gimp.org>
      	* app/gui/Makefile.am
      	* 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]: removed...
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimppdbdialog.[ch]
      	* app/widgets/gimpdataselect.[ch]
      	* app/widgets/gimpbrushselect.[ch]
      	* app/widgets/gimpgradientselect.[ch]
      	* app/widgets/gimppaletteselect.[ch]
      	* app/widgets/gimppatternselect.[ch]
      	* app/widgets/gimpfontselect.[ch]: ...and added here as a
      	hierarchy of widgets.
      	* app/widgets/gimpdatafactoryview.h: removed typdef
      	GimpDataEditFunc, it's in widgets-types.h now.
      	* app/gui/convert-dialog.c: changed accordingly.
      	* app/core/gimp.[ch]: added vtable entries for creating, closing
      	and setting PDB dialogs.
      	* app/gui/gui-vtable.c: implement the vtable entries using the new
      	* tools/pdbgen/pdb/brush_select.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: use the new functions of
      	the Gimp object to create / manage the selection dialogs. The
      	generated files don't depend on GUI stuff any longer.
      	* app/pdb/brush_select_cmds.c
      	* app/pdb/font_select_cmds.c
      	* app/pdb/gradient_select_cmds.c
      	* app/pdb/palette_select_cmds.c
      	* app/pdb/pattern_select_cmds.c: regenerated.