Commit Graph

125 Commits

Author SHA1 Message Date
Michael Natterer 03085f491d app: ref the GimpProgress in gimp_procedure_execute[_async]()
around calling the actual execute vfuncs, Seen a crash when quitting
GIMP while a script-fu window was open, the progress was already
finalized. Now it simply prints the error message about the failing
script on the concole.
2017-05-28 17:41:52 +02:00
Michael Natterer 47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
Michael Natterer 7c0d7c6311 app: add new virtual function GimpProcedure::get_help_id()
Implement the new function in GimpPlugInProcedure and remove
gimp_plug_in_procedure_get_help_id().
2016-01-17 17:15:27 +01:00
Michael Natterer 926dd1dffb app: add GimpProcedure::get_sensntive()
to replace gimp_plug_in_procedure_get_seisitive().
2016-01-01 23:24:53 +01:00
Michael Natterer 78f5dbeac3 app: add GimpProcedure::get_menu_label()
which returns a procedure's *menu* label (not stripped of mnemonics
and ellipses). Use it to further reduce dependencies on
GimpPlugInProcedure.
2016-01-01 22:41:42 +01:00
Michael Natterer 1d3bf65934 app: turn get_label() and get_blurb() into virtual functions of GimpProcedure 2016-01-01 20:52:45 +01:00
Michael Natterer d5255dc133 app: derive GimpProcedure from GimpViewable
and remove redundant icon managing code from GimpPlugInProcedure
2016-01-01 20:05:32 +01:00
Michael Natterer 980ba7f85a app: move memsize functions into their own files gimp-memsize.[ch] 2014-08-12 13:57:57 +02:00
Michael Natterer 60014630fa app: gimp_procedure_execute(): don't use a NULL plug-ins error message
return_vals[1] being present and being a string doesn't neccessarily
mean it comes from the plug-in, it might just as well be its first
return value, which gets generated and NULL-initialized by the plug-in
execution code even if the plug-in didn't actually return anything.
2014-03-14 20:26:15 +01:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Jehan c7aa623a55 app: clean out a big bunch of leading tabs.
For some unknown reason, most calls to gimp_message_literal() were
indented with tabs.
2013-09-15 04:59:20 +12:00
Michael Natterer 7610e299ae Use GimpValueArray and GimpParamSpecValueArray
instead of the deprecated stuff from GLib.
2012-05-04 00:51:50 +02:00
Michael Natterer f2f1eab753 app: add "ERROR" to the values of enum GimpPdbErrorCode
so they are now GIMP_PDB_ERROR_FOO instead of just GIMP_PDB_FOO,
because it was just too confusing wrt enum GimpPdbStatusType.
2012-03-05 19:36:59 +01:00
Massimo Valentini 1658460523 app: don't g_assert_not_reached on GIMP_PDB_FAILED errors
calling in a script (gimp-file-load-layer 1 image "notexists.bmp")
used to crash GIMP with the following message:

**
Gimp-PDB:ERROR:gimpprocedure.c:491:gimp_procedure_get_return_values:
code should not be reached
gimp-2.7: terminated: Aborted
2012-03-05 18:36:03 +01:00
Michael Natterer 2414301799 Review the last few commits and apply some style fanaticism
some completely unrelated,
2012-02-07 20:36:55 +01:00
Massimo Valentini 39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Michael Natterer 15cf0e9659 app: don't leak all GParamSpecs of GimpProcedures 2011-11-04 01:31:45 +01:00
Martin Nordholts be91f01291 app: Add gimp_procedure_name_compare() 2011-05-05 01:01:17 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 2066545b91 app: add GimpPDBContext which holds more state available to procedures
Initially contains antialias, feather and feather radius for the
upcoming gimp-item-to-selection preocedure. Keeping states in the
context reduces the number of parameters of procedures, and both the
state API and the API using the states can be changed/deprecated
independently. Make sure that all procedures and all plug-ins get
GimpPDBContexts instead of plain GimpContexts passed.
2010-09-04 22:17:01 +02:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Sven Neumann 107f5fc587 don't set an error if the procedure was cancelled.
2009-01-28  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimpprocedure.c (gimp_procedure_execute): don't set an
	error if the procedure was cancelled.


svn path=/trunk/; revision=27967
2009-01-28 22:12:34 +00:00
Martin Nordholts 876a96e44c New helper function that creates a new GimpProcedure that can be used to
* app/pdb/gimpprocedure.[ch] (gimp_procedure_create_override): New
helper function that creates a new GimpProcedure that can be used
to override an existing procedure.

svn path=/trunk/; revision=27950
2009-01-25 20:06:09 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 33eb18a479 app/pdb/gimppdberror.h added generic error codes.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimppdberror.h
	* app/plug-in/gimppluginerror.h: added generic error codes.

	* app/pdb/gimpprocedure.c
	* app/plug-in/gimppluginprocedure.c: use the GIMP_PDB_ERROR and
	GIMP_PLUG_IN_ERROR domains.


svn path=/trunk/; revision=27626
2008-11-12 10:06:07 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Michael Natterer da8137b43c made the string parameters const.
2008-09-03  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_set_static_strings):
	made the string parameters const.


svn path=/trunk/; revision=26846
2008-09-03 20:26:05 +00:00
Sven Neumann a2cd4b73ec Next step towards fixing bug #344818:
2008-08-17  Sven Neumann  <sven@gimp.org>

	Next step towards fixing bug #344818:

	* app/pdb/gimpprocedure.c (gimp_procedure_execute): if the error
	has not already been set, construct one from the error message
	that is optionally passed with the return values.

	* plug-ins/common/file-png.c: changed to pass an error message
	with the return values instead of calling g_message() in case of
	an error.


svn path=/trunk/; revision=26620
2008-08-17 12:13:46 +00:00
Sven Neumann f84608d539 If a procedure call fails, pass a string describing the error as the
2008-08-16  Sven Neumann  <sven@gimp.org>

	If a procedure call fails, pass a string describing the error as
	the second return value. First step towars fixing bug #344818.

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_get_return_values):
	added a GError parameter. If it is set, pass the error message 
to
	the return values.

	* app/pdb/gimppdberror.h: added some more error codes.

	* app/pdb/gimppdb.c
	* app/xcf/xcf.c: pass errors to 
gimp_procedure_get_return_values().

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	show a different error message for execution vs. calling errors.

	* app/plug-in/gimpplugin-progress.c
	(gimp_plug_in_progress_cancel_callback): pass the error
	GIMP_PDB_CANCELLED to gimp_procedure_get_return_values().

	* app/plug-in/gimppluginmanager-call.[ch]
	(gimp_plug_in_manager_call_run): removed the 
'destroy_return_vals'
	parameter.

	* app/plug-in/gimppluginprocedure.c: destroy the return values 
here.

	* app/plug-in/gimppluginprocframe.c: pass an error to
	gimp_procedure_get_return_values().

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: generate code that passes the
	error to gimp_procedure_get_return_values().

	* app/pdb/*-cmds.c: regenerated.
	
	* plug-ins/pygimp/pygimp-pdb.c: extract the error message from 
the
	return values and pass it to the exception that is thrown.


svn path=/trunk/; revision=26593
2008-08-16 13:57:57 +00:00
Sven Neumann 915ac64ad5 use GError for error reporting in PDB invoker methods.
2007-12-02  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/app.pl: use GError for error reporting in PDB
	invoker methods.

	* tools/pdbgen/pdb/vectors.pdb: use the GError for the 
procedures
	introduced for bug #497159.

	* tools/pdbgen/pdb/fileops.pdb: use the GError from file-load 
and
	file-save procedures.

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

	* app/pdb/Makefile.am

	* app/pdb/gimppdberror.[ch]: new file introducing the
	GIMP_PDB_ERROR domain.

	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/batch.c
	* app/core/gimpimagefile.c
	* app/core/gimppdbprogress.c
	* app/file/file-open.[ch]
	* app/file/file-save.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/plug-in/gimptemporaryprocedure.c
	* app/plug-in/plug-in-icc-profile.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]: changed accordingly.


svn path=/trunk/; revision=24255
2007-12-02 18:05:54 +00:00
Michael Natterer 036085fd9e app/base/temp-buf.c app/base/tile-manager.c accept NULL in all
2007-11-16  Michael Natterer  <mitch@gimp.org>

	* app/base/temp-buf.c
	* app/base/tile-manager.c
	* app/core/gimpobject.c: accept NULL in all get_memsize() functions.

	* app/core/gimp-utils.[ch]: ditto. Added gimp_string_get_memsize().

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimpdrawableundo.c
	* app/core/gimpimage.c
	* app/core/gimpitempropundo.c
	* app/core/gimplayer.c
	* app/core/gimpmaskundo.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimppreviewcache.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugindef.c
	* app/plug-in/gimppluginmanager.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/text/gimptextundo.c
	* app/vectors/gimpvectorsmodundo.c: simplify
	GimpObject::get_memsize() implementations accordingly.

	* app/core/gimpimageundo.c: ditto. Always keep around colormaps in
	chunks of GIMP_IMAGE_COLORMAP_SIZE to be coonsistent with the
	other colormap handling code.


svn path=/trunk/; revision=24174
2007-11-16 18:19:30 +00:00
Sven Neumann 967b22fed7 don't pass NULL strings to gimp_message(). Fixes bug #490617.
2007-10-26  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimpprocedure.c (gimp_procedure_validate_args): don't 
pass
	NULL strings to gimp_message(). Fixes bug #490617.


svn path=/trunk/; revision=23958
2007-10-26 20:03:07 +00:00
Sven Neumann 17d4af0080 added const qualifiers.
2007-07-18  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_set_strings): added
	const qualifiers.


svn path=/trunk/; revision=22956
2007-07-18 17:23:51 +00:00
Sven Neumann 618f648c21 pass the GimpProgress to gimp_message().
2007-05-21  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimpprocedure.c (gimp_procedure_validate_args): pass the
	GimpProgress to gimp_message().

	* plug-ins/common/bumpmap.c: reduced number of progress updates.

svn path=/trunk/; revision=22551
2007-05-21 15:57:22 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Kevin Cozens 3c7cca9faf Fix for minor typo in error message.
2006-11-24  Kevin Cozens  <kcozens@cvs.gnome.org>

	* app/pdb/gimpprocedure.c: Fix for minor typo in error message.

	* plug-ins/Lighting/lighting_main.c (check_drawables): Only validate
	ID's for drawables that will be used. Disable use of env map (and not
	bump map) if env drawable is of wrong type.

	* plug-ins/script-fu/ftx/ftx.c: Eliminated some compiler warnings.
2006-11-25 07:27:57 +00:00
Michael Natterer b831c0c32d made validation error messages more human-readable and prepared the code
2006-11-23  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.c (gimp_procedure_validate_args): made
	validation error messages more human-readable and prepared the
	code for validating return values.
2006-11-23 12:42:58 +00:00
Sven Neumann f95a118603 special case invalid drawable and image IDs and try to give a somewhat
2006-11-23  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimpprocedure.c (gimp_procedure_validate_args): special
	case invalid drawable and image IDs and try to give a somewhat
	more helpful error message (addresses bug #378334).
2006-11-23 09:17:07 +00:00
Michael Natterer 1ed8dd4f53 app/actions/data-commands.c app/actions/documents-commands.c
2006-10-09  Michael Natterer  <mitch@gimp.org>

	* app/actions/data-commands.c
	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-contexts.c
	* app/core/gimp-documents.c
	* app/core/gimp-edit.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpdatafactory.[ch]
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimppdbprogress.c
	* app/core/gimpselection.c
	* app/dialogs/palette-import-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/session.c
	* app/gui/themes.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-file.c
	* app/plug-in/gimppluginmanager.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpuimanager.c
	* app/widgets/gimpvectorstreeview.c
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/palette.pdb: convert lots of g_message() to
	gimp_message(). Make sure we never pass unknown strings (like
	error->message) to printf-like functions directly; run them
	thorugh "%s" instead. Don't translate some messages which should
	never happen.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/palette_cmds.c: regenerated.
2006-10-09 18:49:15 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Michael Natterer 5a586ba672 changed parameter "gint display_ID" to "GimpObject *display".
2006-05-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginmanager-call.[ch]
	(gimp_plug_in_manager_call_run): changed parameter "gint display_ID"
	to "GimpObject *display".

	* app/pdb/gimpprocedure.[ch]
	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c: changed
	GimpProcedure::execute_async() the same way.

	* app/plug-in/gimppluginmanager.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/widgets/gimphelp.c: changed accordingly.
2006-05-05 08:29:33 +00:00
Michael Natterer 0855c2e12b added gimp_g_type_instance_get_memsize() and
2006-04-15  Michael Natterer  <mitch@gimp.org>

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

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

	* app/pdb/gimpprocedure.c
	* app/pdb/gimppluginprocedure.c: implement GimpObject::get_memsize().
2006-04-15 15:15:33 +00:00
Michael Natterer b2f2b7148d made plug_in_run_temp() public and changed its parameters to match the
2006-04-07  Michael Natterer  <mitch@gimp.org>

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

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

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

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

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

	Unrelated:

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

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

	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-07 18:23:20 +00:00
Michael Natterer 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 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 086d0b6371 app/plug-in/plug-in-types.h renamed to GimpPlugInProcedure and made a
2006-04-05  Michael Natterer  <mitch@gimp.org>

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

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

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

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

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-05 08:38:33 +00:00
Michael Natterer 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 c7943a28ab app/pdb/Makefile.am removed...
2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/gimpargument.[ch]: removed...

	* app/pdb/gimp-pdb-compat.[ch]: ...and added with renamed functions.
	Added gimp_pdb_compat_param_spec().

	* app/pdb/gimpprocedure.[ch]: removed gimp_procedure_add_compat_arg()
	and _add_compat_value(). Use gimp_pdb_compat_param_spec() plus
	gimp_procedure_add_argument()/return_value() instead.

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

	* app/xcf/xcf.c: no need to use compat functions here.

	* app/pdb/procedural_db_cmds.c: regnerated.
2006-04-04 15:54:51 +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